forked from OSchip/llvm-project
Revert "DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit"
This reverts commit 58afc1bdebf9fa8b178d6c9d89af94c5cc091760. This commit caused the test suite on macOS to fail many tests. It appears that setting breakpoints is the issue. One example that fails is the lit test Breakpoint/case-sensitive.test. llvm-svn: 362862
This commit is contained in:
parent
cdff380681
commit
5ada887bf2
|
@ -608,7 +608,15 @@ SymbolFileDWARF::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) {
|
|||
if (!comp_unit)
|
||||
return nullptr;
|
||||
|
||||
return static_cast<DWARFUnit *>(comp_unit->GetUserData());
|
||||
DWARFDebugInfo *info = DebugInfo();
|
||||
if (info) {
|
||||
// The compile unit ID is the index of the DWARF unit.
|
||||
DWARFUnit *dwarf_cu = info->GetUnitAtIndex(comp_unit->GetID());
|
||||
if (dwarf_cu && dwarf_cu->GetUserData() == nullptr)
|
||||
dwarf_cu->SetUserData(comp_unit);
|
||||
return dwarf_cu;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DWARFDebugRangesBase *SymbolFileDWARF::GetDebugRanges() {
|
||||
|
|
Loading…
Reference in New Issue