diff options
| author | Paul Robinson <paul.robinson@sony.com> | 2018-02-05 20:43:15 +0000 |
|---|---|---|
| committer | Paul Robinson <paul.robinson@sony.com> | 2018-02-05 20:43:15 +0000 |
| commit | 0a22709f067c2305e1d99a7dcc6f74f9d65ef47b (patch) | |
| tree | 9281bec368cb9a66429516c2280ab6d034ec004a /llvm/test/DebugInfo | |
| parent | 02914dc1278cf9b472e9cd4357d641b5dd3f5834 (diff) | |
| download | bcm5719-llvm-0a22709f067c2305e1d99a7dcc6f74f9d65ef47b.tar.gz bcm5719-llvm-0a22709f067c2305e1d99a7dcc6f74f9d65ef47b.zip | |
[DWARF] Regularize dumping strings from line tables.
The major visible difference here is that in line-table dumps,
directory and file names are wrapped in double-quotes; previously,
directory names got single quotes and file names were not quoted at
all.
The improvement in this patch is that when a DWARF v5 line table
header has indirect strings, in a verbose dump these will all have
their section[offset] printed as well as the name itself. This
matches the format used for dumping strings in the .debug_info
section.
Differential Revision: https://reviews.llvm.org/D42802
llvm-svn: 324270
Diffstat (limited to 'llvm/test/DebugInfo')
| -rw-r--r-- | llvm/test/DebugInfo/AMDGPU/dwarfdump-relocs.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/Generic/lto-comp-dir.ll | 4 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarfdump-header-64.s | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarfdump-header.s | 26 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarfdump-line-only.s | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/generate-odr-hash.ll | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/debugmacinfo.test | 6 |
9 files changed, 40 insertions, 38 deletions
diff --git a/llvm/test/DebugInfo/AMDGPU/dwarfdump-relocs.ll b/llvm/test/DebugInfo/AMDGPU/dwarfdump-relocs.ll index bc8548f953c..c6715cde2f8 100644 --- a/llvm/test/DebugInfo/AMDGPU/dwarfdump-relocs.ll +++ b/llvm/test/DebugInfo/AMDGPU/dwarfdump-relocs.ll @@ -13,7 +13,7 @@ ; } ; CHECK-NOT: failed to compute relocation -; CHECK: file_names[ 1] 0 0x00000000 0x00000000 dwarfdump-relocs.cl +; CHECK: file_names[ 1] 0 0x00000000 0x00000000 "dwarfdump-relocs.cl" declare void @llvm.dbg.declare(metadata, metadata, metadata) diff --git a/llvm/test/DebugInfo/Generic/lto-comp-dir.ll b/llvm/test/DebugInfo/Generic/lto-comp-dir.ll index 35a494f2e58..b6d1bf46359 100644 --- a/llvm/test/DebugInfo/Generic/lto-comp-dir.ll +++ b/llvm/test/DebugInfo/Generic/lto-comp-dir.ll @@ -11,13 +11,13 @@ ; CHECK-NEXT: debug_line[{{.*}}] ; CHECK-NEXT: Line table prologue: ; CHECK-NOT: include_directories -; CHECK: file_names[ 1] 0 {{.*}} a.cpp +; CHECK: file_names[ 1] 0 {{.*}} "a.cpp" ; CHECK-NOT: file_names ; CHECK: debug_line[{{.*}}] ; CHECK-NEXT: Line table prologue: ; CHECK-NOT: include_directories -; CHECK: file_names[ 1] 0 {{.*}} b.cpp +; CHECK: file_names[ 1] 0 {{.*}} "b.cpp" ; CHECK-NOT: file_names ; However, if a single line table is emitted and shared between CUs, the diff --git a/llvm/test/DebugInfo/X86/dwarfdump-header-64.s b/llvm/test/DebugInfo/X86/dwarfdump-header-64.s index f9aa51c682e..3b047cd641d 100644 --- a/llvm/test/DebugInfo/X86/dwarfdump-header-64.s +++ b/llvm/test/DebugInfo/X86/dwarfdump-header-64.s @@ -141,9 +141,9 @@ LH_5_end: # CHECK: seg_select_size: 0 # CHECK: prologue_length: 0x00000044 # CHECK: max_ops_per_inst: 1 -# CHECK: include_directories[ 0] = 'Directory5a' -# CHECK: include_directories[ 1] = 'Directory5b' +# CHECK: include_directories[ 0] = .debug_str[0x00000028] = "Directory5a" +# CHECK: include_directories[ 1] = .debug_str[0x00000034] = "Directory5b" # CHECK-NOT: include_directories -# CHECK: file_names[ 1] 0 0x00000051 0x00000052 File5a{{$}} -# CHECK: file_names[ 2] 1 0x00000053 0x00000054 File5b{{$}} +# CHECK: file_names[ 1] 0 0x00000051 0x00000052 "File5a" +# CHECK: file_names[ 2] 1 0x00000053 0x00000054 "File5b" # CHECK-NOT: file_names diff --git a/llvm/test/DebugInfo/X86/dwarfdump-header.s b/llvm/test/DebugInfo/X86/dwarfdump-header.s index 6a9c6012232..350beb37481 100644 --- a/llvm/test/DebugInfo/X86/dwarfdump-header.s +++ b/llvm/test/DebugInfo/X86/dwarfdump-header.s @@ -255,11 +255,11 @@ LH_4_end: # CHECK-NOT: address_size # CHECK-NOT: seg_select_size # CHECK: max_ops_per_inst: 1 -# CHECK: include_directories[ 1] = 'Directory4a' -# CHECK: include_directories[ 2] = 'Directory4b' +# CHECK: include_directories[ 1] = "Directory4a" +# CHECK: include_directories[ 2] = "Directory4b" # CHECK-NOT: include_directories -# CHECK: file_names[ 1] 1 0x00000041 0x00000042 File4a{{$}} -# CHECK: file_names[ 2] 0 0x00000043 0x00000044 File4b{{$}} +# CHECK: file_names[ 1] 1 0x00000041 0x00000042 "File4a" +# CHECK: file_names[ 2] 0 0x00000043 0x00000044 "File4b" # CHECK-NOT: file_names # DWARF v5 line-table header. @@ -324,12 +324,14 @@ LH_5_end: # CHECK: address_size: 8 # CHECK: seg_select_size: 0 # CHECK: max_ops_per_inst: 1 -# CHECK: include_directories[ 0] = 'Directory5a' -# CHECK: include_directories[ 1] = 'Directory5b' +# Mixing .debug_str (here) with .debug_line_str (in file_names) is not +# something a producer would do, but both are legal and we want to test them. +# CHECK: include_directories[ 0] = .debug_str[0x00000045] = "Directory5a" +# CHECK: include_directories[ 1] = .debug_str[0x00000051] = "Directory5b" # CHECK-NOT: include_directories # CHECK: MD5 Checksum -# CHECK: file_names[ 1] 0 00112233445566778899aabbccddeeff File5a{{$}} -# CHECK: file_names[ 2] 1 ffeeddccbbaa99887766554433221100 File5b{{$}} +# CHECK: file_names[ 1] 0 00112233445566778899aabbccddeeff .debug_line_str[0x00000000] = "File5a" +# CHECK: file_names[ 2] 1 ffeeddccbbaa99887766554433221100 .debug_line_str[0x00000007] = "File5b" # CHECK-NOT: file_names .section .debug_line_str,"MS",@progbits,1 @@ -405,9 +407,9 @@ dwo_LH_5_end: # CHECK: address_size: 8 # CHECK: seg_select_size: 0 # CHECK: max_ops_per_inst: 1 -# CHECK: include_directories[ 0] = 'DWODirectory5a' -# CHECK: include_directories[ 1] = 'DWODirectory5b' +# CHECK: include_directories[ 0] = .debug_str[0x0000003d] = "DWODirectory5a" +# CHECK: include_directories[ 1] = .debug_str[0x0000004c] = "DWODirectory5b" # CHECK-NOT: include_directories -# CHECK: file_names[ 1] 0 0x00000015 0x00000025 DWOFile5a{{$}} -# CHECK: file_names[ 2] 1 0x00000035 0x00000045 DWOFile5b{{$}} +# CHECK: file_names[ 1] 0 0x00000015 0x00000025 "DWOFile5a" +# CHECK: file_names[ 2] 1 0x00000035 0x00000045 "DWOFile5b" # CHECK-NOT: file_names diff --git a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s index b2b780285ab..14a6bb6d535 100644 --- a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s +++ b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s @@ -46,8 +46,8 @@ LH_1_end: # PART1-NEXT: total_length: 0x0000002e # PART1-NEXT: version: 4 # PART1-NEXT: prologue_length: 0x00000028 -# PART1: include_directories[ 1] = 'Directory1' -# PART1: file_names[ 1] {{.*}} File1 +# PART1: include_directories[ 1] = "Directory1" +# PART1: file_names[ 1] {{.*}} "File1" # Second line table. LH_2_start: @@ -92,6 +92,6 @@ LH_2_end: # PART2-NEXT: version: 4 # PART2-NEXT: prologue_length: 0x00000022 # PART2-NOT: prologue: -# PART2: include_directories[ 1] = 'Dir2' -# PART2: file_names[ 1] {{.*}} File2 +# PART2: include_directories[ 1] = "Dir2" +# PART2: file_names[ 1] {{.*}} "File2" # PART2-NOT: prologue: diff --git a/llvm/test/DebugInfo/X86/dwarfdump-line-only.s b/llvm/test/DebugInfo/X86/dwarfdump-line-only.s index c19ec30ff63..b4d89807f7c 100644 --- a/llvm/test/DebugInfo/X86/dwarfdump-line-only.s +++ b/llvm/test/DebugInfo/X86/dwarfdump-line-only.s @@ -91,10 +91,10 @@ ls_F2: .asciz "File2" # CHECK: address_size: 8 # CHECK: seg_select_size: 0 # CHECK: max_ops_per_inst: 1 -# CHECK: include_directories[ 0] = 'Directory1' -# CHECK: include_directories[ 1] = 'Directory2' +# CHECK: include_directories[ 0] = .debug_str[0x00000000] = "Directory1" +# CHECK: include_directories[ 1] = .debug_str[0x0000000b] = "Directory2" # CHECK-NOT: include_directories -# CHECK: file_names[ 1] 1 0x00000051 0x00000052 File1{{$}} -# CHECK: file_names[ 2] 0 0x00000053 0x00000054 File2{{$}} +# CHECK: file_names[ 1] 1 0x00000051 0x00000052 .debug_line_str[0x00000000] = "File1" +# CHECK: file_names[ 2] 0 0x00000053 0x00000054 .debug_line_str[0x00000006] = "File2" # CHECK-NOT: file_names # CHECK: 0x0000000000000000 {{.*}} is_stmt end_sequence diff --git a/llvm/test/DebugInfo/X86/generate-odr-hash.ll b/llvm/test/DebugInfo/X86/generate-odr-hash.ll index c687c9e5afa..c73a6ded135 100644 --- a/llvm/test/DebugInfo/X86/generate-odr-hash.ll +++ b/llvm/test/DebugInfo/X86/generate-odr-hash.ll @@ -122,8 +122,8 @@ ; CHECK-LABEL: .debug_line contents: ; CHECK: Line table prologue ; CHECK-NOT: file_names[ -; SINGLE: file_names{{.*}} bar.h -; CHECK: file_names{{.*}} bar.cpp +; SINGLE: file_names{{.*}} "bar.h" +; CHECK: file_names{{.*}} "bar.cpp" ; CHECK-NOT: file_names[ ; FISSION: .debug_line.dwo contents: @@ -133,8 +133,8 @@ ; FISSION-NOT: standard_opcode_lengths ; FISSION-NOT: include_directories ; FISSION-NOT: file_names[ -; FISSION: file_names{{.*}} bar.h -; FISSION: file_names{{.*}} bar.cpp +; FISSION: file_names{{.*}} "bar.h" +; FISSION: file_names{{.*}} "bar.cpp" ; FISSION-NOT: file_names[ ; CHECK-LABEL: .debug_str contents: diff --git a/llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll b/llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll index 64b20e04dee..f3c0527bef0 100644 --- a/llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll +++ b/llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll @@ -27,11 +27,11 @@ ; CHECK-NEXT: debug_line[{{.*}}] ; CHECK-NEXT: Line table prologue: ; CHECK-NEXT: total_length: 0x00000038 -; CHECK: file_names[ 1] 0 0x00000000 0x00000000 simple.c +; CHECK: file_names[ 1] 0 0x00000000 0x00000000 "simple.c" ; CHECK: debug_line[{{.*}}] ; CHECK-NEXT: Line table prologue: ; CHECK-NEXT: total_length: 0x00000039 -; CHECK: file_names[ 1] 0 0x00000000 0x00000000 simple2.c +; CHECK: file_names[ 1] 0 0x00000000 0x00000000 "simple2.c" ; CHECK-NOT: file_names ; DWARF3: .debug_info contents: @@ -46,11 +46,11 @@ ; DWARF3-NEXT: debug_line[{{.*}}] ; DWARF3-NEXT: Line table prologue: ; DWARF3-NEXT: total_length: 0x00000038 -; DWARF3: file_names[ 1] 0 0x00000000 0x00000000 simple.c +; DWARF3: file_names[ 1] 0 0x00000000 0x00000000 "simple.c" ; DWARF3: debug_line[{{.*}}] ; DWARF3-NEXT: Line table prologue: ; DWARF3-NEXT: total_length: 0x00000039 -; DWARF3: file_names[ 1] 0 0x00000000 0x00000000 simple2.c +; DWARF3: file_names[ 1] 0 0x00000000 0x00000000 "simple2.c" ; DWARF3-NOT: file_names ; PR15408 diff --git a/llvm/test/DebugInfo/debugmacinfo.test b/llvm/test/DebugInfo/debugmacinfo.test index fab4ca22527..b417e1bcb25 100644 --- a/llvm/test/DebugInfo/debugmacinfo.test +++ b/llvm/test/DebugInfo/debugmacinfo.test @@ -22,6 +22,6 @@ TEST_MACINFO: DW_MACINFO_define - lineno: 3 macro: M2(x,y) ((x)+(y)* Value2) TEST_MACINFO: DW_MACINFO_end_file TEST_LINE: .debug_line contents: -TEST_LINE: file_names[ 1] 0 0x00000000 0x00000000 dwarfdump-macro.cc -TEST_LINE: file_names[ 2] 1 0x00000000 0x00000000 dwarfdump-macro-cmd.h -TEST_LINE: file_names[ 3] 0 0x00000000 0x00000000 dwarfdump-macro.h +TEST_LINE: file_names[ 1] 0 0x00000000 0x00000000 "dwarfdump-macro.cc" +TEST_LINE: file_names[ 2] 1 0x00000000 0x00000000 "dwarfdump-macro-cmd.h" +TEST_LINE: file_names[ 3] 0 0x00000000 0x00000000 "dwarfdump-macro.h" |

