Skip to content

Commit 1bd4f52

Browse files
labathvladimirlaz
authored andcommitted
Re-commit "DWARF location lists: Add section index dumping"
This reapplies c0f6ad7 with an additional fix in test/DebugInfo/X86/constant-loclist.ll, which had a slightly different output on windows targets. The test now accounts for this difference. The original commit message follows. Summary: As discussed in D70081, this adds the ability to dump section names/indices to the location list dumper. It does this by moving the range specific logic from DWARFDie.cpp:dumpRanges into the DWARFAddressRange class. The trickiest part of this patch is the backflip in the meanings of the two dump flags for the location list sections. The dumping of "raw" location list data is now controlled by "DisplayRawContents" flag. This frees up the "Verbose" flag to be used to control whether we print the section index. Additionally, the DisplayRawContents flag is set for section-based dumps whenever the --verbose option is passed, but this is not done for the "inline" dumps. Also note that the index dumping currently does not work for the DWARF v5 location lists, as the parser does not fill out the appropriate fields. This will be done in a separate patch. Reviewers: dblaikie, probinson, JDevlieghere, SouraVX Subscribers: sdardis, hiraditya, jrtc27, atanasyan, arphaman, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70227
1 parent 160076d commit 1bd4f52

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/test/DebugInfo/X86/constant-loclist.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
; CHECK: .debug_info contents:
66
; CHECK: DW_TAG_variable
77
; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (
8-
; CHECK-NEXT: [0x{{.*}}, 0x{{.*}}): DW_OP_constu 0x4000000000000000)
8+
; CHECK-NEXT: {{.*}}: DW_OP_constu 0x4000000000000000)
99
; CHECK-NEXT: DW_AT_name {{.*}}"d"
1010
; CHECK: DW_TAG_variable
1111
; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (
12-
; CHECK-NEXT: [0x{{.*}}, 0x{{.*}}): DW_OP_consts +0
13-
; CHECK-NEXT: [0x{{.*}}, 0x{{.*}}): DW_OP_consts +4611686018427387904)
12+
; CHECK-NEXT: {{.*}}: DW_OP_consts +0
13+
; CHECK-NEXT: {{.*}}: DW_OP_consts +4611686018427387904)
1414
; CHECK-NEXT: DW_AT_name {{.*}}"i"
1515
; CHECK: DW_TAG_variable
1616
; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (
17-
; CHECK-NEXT: [0x{{.*}}, 0x{{.*}}): DW_OP_lit0
18-
; CHECK-NEXT: [0x{{.*}}, 0x{{.*}}): DW_OP_constu 0x4000000000000000)
17+
; CHECK-NEXT: {{.*}}: DW_OP_lit0
18+
; CHECK-NEXT: {{.*}}: DW_OP_constu 0x4000000000000000)
1919
; CHECK-NEXT: DW_AT_name {{.*}}"u"
2020

2121
source_filename = "test.c"

0 commit comments

Comments
 (0)