diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-11-17 00:39:55 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-11-17 00:39:55 +0000 |
commit | 82641be467c4ab69cac833cdb20088c531305165 (patch) | |
tree | 50a09970251f53c224cf0d6215e0966fba827006 /llvm/test/DebugInfo | |
parent | 71e8169ea83b41ad61b1434c46ce1d1bd8698b4f (diff) | |
download | bcm5719-llvm-82641be467c4ab69cac833cdb20088c531305165.tar.gz bcm5719-llvm-82641be467c4ab69cac833cdb20088c531305165.zip |
dwarfdump: Use the index to find the right abbrev offset in DWP files
llvm-svn: 253277
Diffstat (limited to 'llvm/test/DebugInfo')
-rw-r--r-- | llvm/test/DebugInfo/Inputs/dwarfdump-dwp.x86_64.o | bin | 1976 -> 2000 bytes | |||
-rw-r--r-- | llvm/test/DebugInfo/dwarfdump-dwp.test | 31 |
2 files changed, 24 insertions, 7 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-dwp.x86_64.o b/llvm/test/DebugInfo/Inputs/dwarfdump-dwp.x86_64.o Binary files differindex 2b7ed526ca9..da059f73b9f 100644 --- a/llvm/test/DebugInfo/Inputs/dwarfdump-dwp.x86_64.o +++ b/llvm/test/DebugInfo/Inputs/dwarfdump-dwp.x86_64.o diff --git a/llvm/test/DebugInfo/dwarfdump-dwp.test b/llvm/test/DebugInfo/dwarfdump-dwp.test index 953a58cb4af..0dbe1edf246 100644 --- a/llvm/test/DebugInfo/dwarfdump-dwp.test +++ b/llvm/test/DebugInfo/dwarfdump-dwp.test @@ -6,20 +6,37 @@ RUN: llvm-dwarfdump %p/Inputs/dwarfdump-dwp.x86_64.o | FileCheck %s ; foo a; ; b.cpp: ; struct bar { }; -; bar b; +; bar b() { +; } + +; CHECK: .debug_info.dwo contents: +; CHECK: Compile Unit + +; Verify that the second CU uses the index for its abbrev offset +; CHECK: Compile Unit +; CHECK-SAME: abbr_offset = 0x0043 +; CHECK: DW_TAG_compile_unit +; CHECK-NOT: DW_TAG +; FIXME: Implement str_offsets support so we find b.cpp here \/ +; CHECK: DW_AT_name {{.*}} "a.cpp" + +; Verify that abbreviations are decoded using the abbrev offset in the index +; CHECK: DW_TAG_subprogram +; CHECK: DW_TAG_structure_type ; CHECK: .debug_cu_index contents: ; CHECK-NEXT: version = 2 slots = 16 -; CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS +; CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------ -; CHECK-NEXT: 8 0x03c30756e2d45008 [0x00000000, 0x00000045) [0x00000000, 0x00000067) [0x00000000, 0x00000026) [0x00000000, 0x00000016) -; CHECK-NEXT: 12 0x9aeb3a61ed48510c [0x00000045, 0x00000090) [0x00000067, 0x00000134) [0x00000026, 0x00000052) [0x00000016, 0x00000032) +; CHECK-NEXT: 2 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) +; CHECK-NEXT: 8 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) ; CHECK: .debug_tu_index contents: ; CHECK-NEXT: version = 2 slots = 16 ; CHECK: Index Signature TYPES ABBREV LINE STR_OFFSETS ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------ -; CHECK-NEXT: 8 0x1d02f3be30cc5688 [0x00000036, 0x00000072) [0x00000067, 0x00000134) [0x00000026, 0x00000052) [0x00000016, 0x00000032) -; CHECK-NEXT: 12 0x3875c0e21cda63fc [0x00000000, 0x00000036) [0x00000000, 0x00000067) [0x00000000, 0x00000026) [0x00000000, 0x00000016) +; CHECK-NEXT: 8 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) +; CHECK-NEXT: 12 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) -; TODO: use the index section offset info to correctly dump debug_info +; TODO: use the index section offset info to correctly dump strings in debug info +; TODO: use the index section offset info to correctly dump file names in debug info |