forked from OSchip/llvm-project
Fixed a crasher that could happen when trying to look at N_GSYM entries
in the DWARF + debug map symbol file parser. Also cleaned up the "image lookup --address ADDR" output when we it results in something that is in an inlined function. Now we correctly dump out the full inlined call stack. llvm-svn: 125072
This commit is contained in:
parent
a57a66e8d0
commit
7012049c7f
|
@ -323,7 +323,7 @@ public:
|
|||
/// Get const accessor for any inlined function information.
|
||||
///
|
||||
/// @return
|
||||
/// A cpmst pointer to any inlined function information, or NULL
|
||||
/// A comst pointer to any inlined function information, or NULL
|
||||
/// if this is a regular block.
|
||||
//------------------------------------------------------------------
|
||||
const InlineFunctionInfo*
|
||||
|
|
|
@ -248,7 +248,10 @@ LookupAddressInModule
|
|||
so_addr.Dump (&strm, exe_scope, Address::DumpStyleSectionNameOffset);
|
||||
strm.EOL();
|
||||
strm.Indent (" Summary: ");
|
||||
const uint32_t save_indent = strm.GetIndentLevel ();
|
||||
strm.SetIndentLevel (save_indent + 11);
|
||||
so_addr.Dump (&strm, exe_scope, Address::DumpStyleResolvedDescription);
|
||||
strm.SetIndentLevel (save_indent);
|
||||
strm.EOL();
|
||||
// Print out detailed address information when verbose is enabled
|
||||
if (verbose)
|
||||
|
|
|
@ -363,7 +363,7 @@ SymbolFileDWARFDebugMap::GetSymbolFileByCompUnitInfo (CompileUnitInfo *comp_unit
|
|||
#endif
|
||||
// Next we find the non-stab entry that corresponds to the N_GSYM in the .o file
|
||||
Symbol *oso_gsym_symbol = oso_symtab->FindFirstSymbolWithNameAndType(exe_symbol->GetMangled().GetName(), eSymbolTypeData, Symtab::eDebugNo, Symtab::eVisibilityAny);
|
||||
if (exe_gsym_symbol && oso_gsym_symbol)
|
||||
if (exe_gsym_symbol && oso_gsym_symbol && exe_gsym_symbol->GetAddressRangePtr() && oso_gsym_symbol->GetAddressRangePtr())
|
||||
{
|
||||
// If we found the symbol, then we
|
||||
Section* exe_gsym_section = const_cast<Section *>(exe_gsym_symbol->GetAddressRangePtr()->GetBaseAddress().GetSection());
|
||||
|
|
|
@ -172,7 +172,7 @@ Block::DumpStopContext
|
|||
// First frame in a frame with inlined functions
|
||||
s->PutCString (" [inlined]");
|
||||
}
|
||||
if (show_inline_blocks)
|
||||
if (show_inline_blocks && child_inline_call_site)
|
||||
s->EOL();
|
||||
else
|
||||
s->PutChar(' ');
|
||||
|
|
|
@ -133,29 +133,6 @@ SymbolContext::DumpStopContext
|
|||
if (function->GetMangled().GetName())
|
||||
function->GetMangled().GetName().Dump(s);
|
||||
|
||||
if (show_inlined_frames && block)
|
||||
{
|
||||
const InlineFunctionInfo *inline_info = block->GetInlinedFunctionInfo();
|
||||
if (inline_info == NULL)
|
||||
{
|
||||
const Block *parent_inline_block = block->GetInlinedParent();
|
||||
if (parent_inline_block)
|
||||
inline_info = parent_inline_block->GetInlinedFunctionInfo();
|
||||
}
|
||||
|
||||
if (inline_info)
|
||||
{
|
||||
s->PutCString(" [inlined] ");
|
||||
inline_info->GetName().Dump(s);
|
||||
|
||||
if (line_entry.IsValid())
|
||||
{
|
||||
s->PutCString(" at ");
|
||||
line_entry.DumpStopContext(s, show_fullpaths);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (addr.IsValid())
|
||||
{
|
||||
const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetOffset();
|
||||
|
|
Loading…
Reference in New Issue