From e6c2c9a7d15171a57c98024511eaa8885f1bd5fd Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 2 Aug 2020 22:41:02 +0200 Subject: [PATCH] [lldb] [test] Fix DW_TAG_GNU_call_site-DW_AT_low_pc.s relocation I have made the DW_FORM_ref4 relative. One could also use relocated DW_FORM_ref_addr instead. Tested with: echo 'void f(){}'|clang -o 1.o -c -Wall -g -x c -;./bin/clang -o 1 1.o ../llvm-monorepo/lldb/test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s;./bin/lldb --no-lldbinit ./1 -o r -o 'p p' -o exit --- .../test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s b/lldb/test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s index 29cafeb..8cc1cc1 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s +++ b/lldb/test/Shell/SymbolFile/DWARF/DW_TAG_GNU_call_site-DW_AT_low_pc.s @@ -79,7 +79,7 @@ main: .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram) # DW_AT_external .asciz "main" # DW_AT_name: "main" - .long .Ltype_int # DW_AT_type + .long .Ltype_int - .Ldebug_info0 # DW_AT_type .quad .LFB2 # DW_AT_low_pc .quad .LFE2-.LFB2 # DW_AT_high_pc .uleb128 0x1 # DW_AT_frame_base @@ -87,7 +87,7 @@ main: # DW_AT_GNU_all_call_sites .uleb128 0x3 # (DIE (0x4f) DW_TAG_GNU_call_site) .quad .LVL4 # DW_AT_low_pc - .long .Lfunc_a # DW_AT_abstract_origin + .long .Lfunc_a - .Ldebug_info0 # DW_AT_abstract_origin .uleb128 0x4 # (DIE (0x5c) DW_TAG_GNU_call_site_parameter) .uleb128 0x1 # DW_AT_location .byte 0x55 # DW_OP_reg5 @@ -111,7 +111,7 @@ main: # DW_AT_GNU_all_call_sites .uleb128 0x7 # (DIE (0x86) DW_TAG_formal_parameter) .asciz "p" # DW_AT_name - .long .Ltype_int # DW_AT_type + .long .Ltype_int - .Ldebug_info0 # DW_AT_type .long .LLST0 # DW_AT_location .byte 0 # end of children of DIE 0x6a .byte 0 # end of children of DIE 0xb -- 2.7.4