forked from OSchip/llvm-project
Fix the lldb_private::Function::GetDescription to print out the name and mangled name correctly. Previously this was getting the function type's name which was not correct.
This info appears in the output of "image lookup --verbose --address ADDRESS". llvm-svn: 294804
This commit is contained in:
parent
541cf97fe0
commit
b663010f4d
|
@ -228,12 +228,15 @@ const CompileUnit *Function::GetCompileUnit() const { return m_comp_unit; }
|
|||
|
||||
void Function::GetDescription(Stream *s, lldb::DescriptionLevel level,
|
||||
Target *target) {
|
||||
Type *func_type = GetType();
|
||||
const char *name = func_type ? func_type->GetName().AsCString() : "<unknown>";
|
||||
|
||||
*s << "id = " << (const UserID &)*this << ", name = \"" << name
|
||||
<< "\", range = ";
|
||||
ConstString name = GetName();
|
||||
ConstString mangled = m_mangled.GetMangledName();
|
||||
|
||||
*s << "id = " << (const UserID &)*this;
|
||||
if (name)
|
||||
*s << ", name = \"" << name.GetCString() << '"';
|
||||
if (mangled)
|
||||
*s << ", mangled = \"" << mangled.GetCString() << '"';
|
||||
*s << ", range = ";
|
||||
Address::DumpStyle fallback_style;
|
||||
if (level == eDescriptionLevelVerbose)
|
||||
fallback_style = Address::DumpStyleModuleWithFileAddress;
|
||||
|
|
Loading…
Reference in New Issue