Skip to content

Commit

Permalink
Fix DWARFASTParserRust::ParseFunctionFromDWARF for r350943
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jan 16, 2019
1 parent 0fb81ce commit a27fbee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserRust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ bool DWARFASTParserRust::CompleteTypeFromDWARF(const DWARFDIE &die,
return bool(die);
}

Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,
Function *DWARFASTParserRust::ParseFunctionFromDWARF(CompileUnit &comp_unit,
const DWARFDIE &die) {
DWARFRangeList func_ranges;
const char *name = NULL;
Expand Down Expand Up @@ -1091,7 +1091,7 @@ Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,
std::unique_ptr<Declaration> decl_ap;
if (decl_file != 0 || decl_line != 0 || decl_column != 0)
decl_ap.reset(new Declaration(
sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file),
comp_unit.GetSupportFiles().GetFileSpecAtIndex(decl_file),
decl_line, decl_column));

SymbolFileDWARF *dwarf = die.GetDWARF();
Expand All @@ -1102,15 +1102,15 @@ Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,

if (dwarf->FixupAddress(func_range.GetBaseAddress())) {
const user_id_t func_user_id = die.GetID();
func_sp.reset(new Function(sc.comp_unit,
func_sp.reset(new Function(&comp_unit,
func_user_id, // UserID is the DIE offset
func_user_id, func_name, func_type,
func_range)); // first address range

if (func_sp.get() != NULL) {
if (frame_base.IsValid())
func_sp->GetFrameBaseExpression() = frame_base;
sc.comp_unit->AddFunction(func_sp);
comp_unit.AddFunction(func_sp);
return func_sp.get();
}
}
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserRust.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DWARFASTParserRust : public DWARFASTParser {
bool *type_is_new_ptr) override;

lldb_private::Function *
ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
const DWARFDIE &die) override;

bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
Expand Down

0 comments on commit a27fbee

Please sign in to comment.