diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-07-13 09:54:41 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-07-13 09:54:41 +0000 |
commit | c9627aeae6a496443b389086aef58844ff4823ba (patch) | |
tree | 6e73a5c3c2663e7fe2740fba72a09de4dd74a8da /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | 6bee961a2e2d12955fba56370fe694f860127c97 (diff) | |
download | bcm5719-llvm-c9627aeae6a496443b389086aef58844ff4823ba.tar.gz bcm5719-llvm-c9627aeae6a496443b389086aef58844ff4823ba.zip |
Skip oatdata and oatexec symbols in system@framework@boot.oat
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.
Differential revision: http://reviews.llvm.org/D11065
llvm-svn: 242017
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index aaa4379b8e7..5fc83f06157 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1795,7 +1795,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) { @@ -1809,7 +1818,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; |