forked from OSchip/llvm-project
Fixed a missing newline when dumping mixed disassembly.
Added a "bool show_fullpaths" to many more objects that were previously always dumping full paths. Fixed a few places where the DWARF was not indexed when we we needed it to be when making queries. Also fixed an issue where the DWARF in .o files wasn't searching all .o files for the types. Fixed an issue with the output from "image lookup --type <TYPENAME>" where the name and byte size might not be resolved and might not display. We now call the accessors so we end up seeing all of the type info. llvm-svn: 113951
This commit is contained in:
parent
ded2fa3991
commit
6dbd39838d
|
@ -100,7 +100,7 @@ public:
|
|||
/// The stream to which to dump the object descripton.
|
||||
//------------------------------------------------------------------
|
||||
void
|
||||
Dump (Stream *s) const;
|
||||
Dump (Stream *s, bool show_fullpaths) const;
|
||||
|
||||
void
|
||||
DumpStopContext (Stream *s, bool show_fullpaths) const;
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
/// The stream to which to dump the object descripton.
|
||||
//------------------------------------------------------------------
|
||||
void
|
||||
Dump (Stream *s) const;
|
||||
Dump (Stream *s, bool show_fullpaths) const;
|
||||
|
||||
//------------------------------------------------------------------
|
||||
/// Get accessor for the declaration information.
|
||||
|
@ -236,7 +236,7 @@ public:
|
|||
/// The stream to which to dump the object descripton.
|
||||
//------------------------------------------------------------------
|
||||
void
|
||||
Dump(Stream *s) const;
|
||||
Dump(Stream *s, bool show_fullpaths) const;
|
||||
|
||||
void
|
||||
DumpStopContext (Stream *s) const;
|
||||
|
|
|
@ -2339,7 +2339,6 @@
|
|||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
en,
|
||||
|
|
|
@ -196,7 +196,7 @@ CommandObjectDisassemble::Execute
|
|||
ExecutionContext exe_ctx(interpreter.GetDebugger().GetExecutionContext());
|
||||
|
||||
if (m_options.show_mixed && m_options.num_lines_context == 0)
|
||||
m_options.num_lines_context = 3;
|
||||
m_options.num_lines_context = 1;
|
||||
|
||||
if (!m_options.m_func_name.empty())
|
||||
{
|
||||
|
|
|
@ -107,7 +107,10 @@ Disassembler::Disassemble
|
|||
if (module)
|
||||
{
|
||||
if (!module->FindFunctions (name,
|
||||
eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
|
||||
eFunctionNameTypeBase |
|
||||
eFunctionNameTypeFull |
|
||||
eFunctionNameTypeMethod |
|
||||
eFunctionNameTypeSelector,
|
||||
true,
|
||||
sc_list))
|
||||
return false;
|
||||
|
@ -115,7 +118,10 @@ Disassembler::Disassemble
|
|||
else
|
||||
{
|
||||
if (exe_ctx.target->GetImages().FindFunctions (name,
|
||||
eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
|
||||
eFunctionNameTypeBase |
|
||||
eFunctionNameTypeFull |
|
||||
eFunctionNameTypeMethod |
|
||||
eFunctionNameTypeSelector,
|
||||
false,
|
||||
sc_list))
|
||||
{
|
||||
|
@ -240,7 +246,8 @@ Disassembler::Disassemble
|
|||
if (offset != 0)
|
||||
strm.EOL();
|
||||
|
||||
sc.DumpStopContext(&strm, process, addr, true, true, false);
|
||||
sc.DumpStopContext(&strm, process, addr, false, true, false);
|
||||
strm.EOL();
|
||||
|
||||
if (sc.comp_unit && sc.line_entry.IsValid())
|
||||
{
|
||||
|
|
|
@ -1834,6 +1834,10 @@ SymbolFileDWARF::FindTypes(const SymbolContext& sc, const ConstString &name, boo
|
|||
if (!append)
|
||||
types.Clear();
|
||||
|
||||
// Index if we already haven't to make sure the compile units
|
||||
// get indexed and make their global DIE index list
|
||||
if (!m_indexed)
|
||||
Index ();
|
||||
|
||||
const uint32_t initial_types_size = types.GetSize();
|
||||
DWARFCompileUnit* cu = NULL;
|
||||
|
|
|
@ -878,14 +878,35 @@ SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool app
|
|||
|
||||
|
||||
uint32_t
|
||||
SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
|
||||
SymbolFileDWARFDebugMap::FindTypes
|
||||
(
|
||||
const SymbolContext& sc,
|
||||
const ConstString &name,
|
||||
bool append,
|
||||
uint32_t max_matches,
|
||||
TypeList& types
|
||||
)
|
||||
{
|
||||
SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc);
|
||||
if (oso_dwarf)
|
||||
return oso_dwarf->FindTypes (sc, name, append, max_matches, types);
|
||||
if (!append)
|
||||
types.Clear();
|
||||
return 0;
|
||||
|
||||
const uint32_t initial_types_size = types.GetSize();
|
||||
SymbolFileDWARF *oso_dwarf;
|
||||
|
||||
if (sc.comp_unit)
|
||||
{
|
||||
oso_dwarf = GetSymbolFile (sc);
|
||||
if (oso_dwarf)
|
||||
return oso_dwarf->FindTypes (sc, name, append, max_matches, types);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t oso_idx = 0;
|
||||
while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL)
|
||||
oso_dwarf->FindTypes (sc, name, append, max_matches, types);
|
||||
}
|
||||
|
||||
return types.GetSize() - initial_types_size;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -57,7 +57,10 @@ Block::GetDescription(Stream *s, Function *function, lldb::DescriptionLevel leve
|
|||
}
|
||||
|
||||
if (m_inlineInfoSP.get() != NULL)
|
||||
m_inlineInfoSP->Dump(s);
|
||||
{
|
||||
bool show_fullpaths = (level == eDescriptionLevelVerbose);
|
||||
m_inlineInfoSP->Dump(s, show_fullpaths);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -83,7 +86,10 @@ Block::Dump(Stream *s, addr_t base_addr, int32_t depth, bool show_context) const
|
|||
s->Printf(", parent = {0x%8.8x}", parent_block->GetID());
|
||||
}
|
||||
if (m_inlineInfoSP.get() != NULL)
|
||||
m_inlineInfoSP->Dump(s);
|
||||
{
|
||||
bool show_fullpaths = false;
|
||||
m_inlineInfoSP->Dump(s, show_fullpaths);
|
||||
}
|
||||
|
||||
if (!m_ranges.empty())
|
||||
{
|
||||
|
|
|
@ -57,11 +57,15 @@ Declaration::Clear()
|
|||
}
|
||||
|
||||
void
|
||||
Declaration::Dump(Stream *s) const
|
||||
Declaration::Dump(Stream *s, bool show_fullpaths) const
|
||||
{
|
||||
if (m_file)
|
||||
{
|
||||
*s << ", decl = " << m_file;
|
||||
*s << ", decl = ";
|
||||
if (show_fullpaths)
|
||||
*s << m_file;
|
||||
else
|
||||
*s << m_file.GetFilename();
|
||||
if (m_line > 0)
|
||||
s->Printf(":%u", m_line);
|
||||
if (m_column > 0)
|
||||
|
|
|
@ -45,11 +45,11 @@ FunctionInfo::~FunctionInfo()
|
|||
}
|
||||
|
||||
void
|
||||
FunctionInfo::Dump(Stream *s) const
|
||||
FunctionInfo::Dump(Stream *s, bool show_fullpaths) const
|
||||
{
|
||||
if (m_name)
|
||||
*s << ", name = \"" << m_name << "\"";
|
||||
m_declaration.Dump(s);
|
||||
m_declaration.Dump(s, show_fullpaths);
|
||||
}
|
||||
|
||||
|
||||
|
@ -131,9 +131,9 @@ InlineFunctionInfo::Compare(const InlineFunctionInfo& a, const InlineFunctionInf
|
|||
}
|
||||
|
||||
void
|
||||
InlineFunctionInfo::Dump(Stream *s) const
|
||||
InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const
|
||||
{
|
||||
FunctionInfo::Dump(s);
|
||||
FunctionInfo::Dump(s, show_fullpaths);
|
||||
if (m_mangled)
|
||||
m_mangled.Dump(s);
|
||||
}
|
||||
|
|
|
@ -87,13 +87,15 @@ lldb_private::Type::GetDescription (Stream *s, lldb::DescriptionLevel level, boo
|
|||
{
|
||||
*s << "id = " << (const UserID&)*this;
|
||||
|
||||
if (show_name && m_name)
|
||||
// Call the name accessor to make sure we resolve the type name
|
||||
if (show_name && GetName())
|
||||
*s << ", name = \"" << m_name << '"';
|
||||
|
||||
if (m_byte_size != 0)
|
||||
// Call the get byte size accesor so we resolve our byte size
|
||||
if (GetByteSize())
|
||||
s->Printf(", byte-size = %zu", m_byte_size);
|
||||
|
||||
m_decl.Dump(s);
|
||||
bool show_fullpaths = (level == lldb::eDescriptionLevelVerbose);
|
||||
m_decl.Dump(s, show_fullpaths);
|
||||
|
||||
if (m_clang_qual_type)
|
||||
{
|
||||
|
@ -138,7 +140,8 @@ lldb_private::Type::Dump (Stream *s, bool show_context)
|
|||
s->PutCString(" )");
|
||||
}
|
||||
|
||||
m_decl.Dump(s);
|
||||
bool show_fullpaths = false;
|
||||
m_decl.Dump (s,show_fullpaths);
|
||||
|
||||
if (m_clang_qual_type)
|
||||
{
|
||||
|
|
|
@ -91,7 +91,8 @@ Variable::Dump(Stream *s, bool show_context) const
|
|||
s->PutCString(" )");
|
||||
}
|
||||
|
||||
m_declaration.Dump(s);
|
||||
bool show_fullpaths = false;
|
||||
m_declaration.Dump(s, show_fullpaths);
|
||||
|
||||
if (m_location.IsValid())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue