================
@@ -0,0 +1,102 @@
+# REQUIRES: x86, lld
+
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %t/file.s -o %t/file.o
+# RUN: ld.lld %t/file.o -o %t/file.out -T %t/file.lds
+# RUN: %lldb %t/file.out -o "disassemble --name func1" -o exit | FileCheck %s
+
+# CHECK:      (lldb) disassemble --name func1
+# CHECK:      file.out`func1:
+# CHECK-NEXT: file.out[0x0] <+0>: int    $0x2a
+# CHECK:      file.out`func1:
+# CHECK-NEXT: file.out[0x1000] <+4096>: int    $0x2f
+
+
+#--- file.lds
+PHDRS {
----------------
labath wrote:

Added something, though I don't know if it helps. There aren't any "tricky" 
situations here, basically, the only requirement is to have a function in 
multiple sections. Its just that creating a binary with deterministic content 
takes up a bunch of space (for the DWARF mainly). It would be possible to 
create this setup with a compiler, but then both the instructions and their 
addresses would be unpredictable so it would be hard to assert anything.

https://github.com/llvm/llvm-project/pull/137955
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to