[Lldb-commits] [lldb] [lldb] Fix block address resolution for functions in multiple sections (PR #137955)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 03:15:58 PDT 2025


================
@@ -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 {
----------------
DavidSpickett wrote:

This and the assembly need some more comments to point out why these are in this order and what triggers the tricky situations you're handling here.

https://github.com/llvm/llvm-project/pull/137955


More information about the lldb-commits mailing list