Skip to content

Commit 011e7bc

Browse files
committed
Revert "[lldb] Fix handling of DW_AT_decl_file according to D91014"
This reverts commit 7ec7876. Non-x86_64 non-Linux bots broke by the testcase.
1 parent 922de25 commit 011e7bc

File tree

4 files changed

+3
-334
lines changed

4 files changed

+3
-334
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,8 +2201,7 @@ size_t DWARFASTParserClang::ParseChildEnumerators(
22012201
case DW_AT_description:
22022202
default:
22032203
case DW_AT_decl_file:
2204-
decl.SetFile(attributes.CompileUnitAtIndex(i)->GetFile(
2205-
form_value.Unsigned()));
2204+
decl.SetFile(die.GetCU()->GetFile(form_value.Unsigned()));
22062205
break;
22072206
case DW_AT_decl_line:
22082207
decl.SetLine(form_value.Unsigned());

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,8 +3126,8 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
31263126
continue;
31273127
switch (attr) {
31283128
case DW_AT_decl_file:
3129-
decl.SetFile(
3130-
attributes.CompileUnitAtIndex(i)->GetFile(form_value.Unsigned()));
3129+
decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(
3130+
form_value.Unsigned()));
31313131
break;
31323132
case DW_AT_decl_line:
31333133
decl.SetLine(form_value.Unsigned());

lldb/test/Shell/SymbolFile/DWARF/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s

Lines changed: 0 additions & 170 deletions
This file was deleted.

lldb/test/Shell/SymbolFile/DWARF/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)