summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-06 15:21:47 +0000
committerdim <dim@FreeBSD.org>2015-09-06 15:21:47 +0000
commiteaea1142467bd061be671b7775195ea69422a53f (patch)
tree6dbe733cbb748d293bbaa2b7616e76faff7118d5 /contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parentee8d011a70fa14b1e123f58d0139125f5e36173e (diff)
parent80b639cd40df427b9e325318efeec2d885a65f62 (diff)
downloadFreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.zip
FreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.tar.gz
Update lldb to upstream trunk r242221.
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 7e89147..4faf6d8 100644
--- a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1563,7 +1563,7 @@ ObjectFileELF::GetSegmentDataByIndex(lldb::user_id_t id)
std::string
ObjectFileELF::StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const
{
- size_t pos = symbol_name.find("@");
+ size_t pos = symbol_name.find('@');
return symbol_name.substr(0, pos).str();
}
@@ -1800,7 +1800,16 @@ ObjectFileELF::ParseSymbols (Symtab *symtab,
static ConstString bss_section_name(".bss");
static ConstString opd_section_name(".opd"); // For ppc64
- //StreamFile strm(stdout, false);
+ // On Android the oatdata and the oatexec symbols in system@framework@boot.oat covers the full
+ // .text section what causes issues with displaying unusable symbol name to the user and very
+ // slow unwinding speed because the instruction emulation based unwind plans try to emulate all
+ // instructions in these symbols. Don't add these symbols to the symbol list as they have no
+ // use for the debugger and they are causing a lot of trouble.
+ // Filtering can't be restricted to Android because this special object file don't contain the
+ // note section specifying the environment to Android but the custom extension and file name
+ // makes it highly unlikely that this will collide with anything else.
+ bool skip_oatdata_oatexec = m_file.GetFilename() == ConstString("system@framework@boot.oat");
+
unsigned i;
for (i = 0; i < num_symbols; ++i)
{
@@ -1814,7 +1823,10 @@ ObjectFileELF::ParseSymbols (Symtab *symtab,
(symbol_name == NULL || symbol_name[0] == '\0'))
continue;
- //symbol.Dump (&strm, i, &strtab_data, section_list);
+ // Skipping oatdata and oatexec sections if it is requested. See details above the
+ // definition of skip_oatdata_oatexec for the reasons.
+ if (skip_oatdata_oatexec && (::strcmp(symbol_name, "oatdata") == 0 || ::strcmp(symbol_name, "oatexec") == 0))
+ continue;
SectionSP symbol_section_sp;
SymbolType symbol_type = eSymbolTypeInvalid;
@@ -2036,8 +2048,9 @@ ObjectFileELF::ParseSymbols (Symtab *symtab,
if (! mangled_name.empty())
mangled.SetMangledName( ConstString((mangled_name + suffix).str()) );
- llvm::StringRef demangled_name = mangled.GetDemangledName().GetStringRef();
- if (! demangled_name.empty())
+ ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeUnknown);
+ llvm::StringRef demangled_name = demangled.GetStringRef();
+ if (!demangled_name.empty())
mangled.SetDemangledName( ConstString((demangled_name + suffix).str()) );
}
OpenPOWER on IntegriCloud