[Lldb-commits] [PATCH] D22040: Add oat symbolization support for odex files
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 6 06:00:42 PDT 2016
tberghammer created this revision.
tberghammer added reviewers: labath, ovyalov.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.
Add oat symbolization support for odex files
http://reviews.llvm.org/D22040
Files:
source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
source/Plugins/Platform/Android/PlatformAndroid.cpp
Index: source/Plugins/Platform/Android/PlatformAndroid.cpp
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ source/Plugins/Platform/Android/PlatformAndroid.cpp
@@ -317,8 +317,9 @@
const FileSpec& dst_file_spec)
{
// For oat file we can try to fetch additional debug info from the device
- if (module_sp->GetFileSpec().GetFileNameExtension() != ConstString("oat"))
- return Error("Symbol file downloading only supported for oat files");
+ ConstString extension = module_sp->GetFileSpec().GetFileNameExtension();
+ if (extension != ConstString("oat") && extension != ConstString("odex"))
+ return Error("Symbol file downloading only supported for oat and odex files");
// If we have no information about the platform file we can't execute oatdump
if (!module_sp->GetPlatformFileSpec())
Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -2184,15 +2184,16 @@
static ConstString bss_section_name(".bss");
static ConstString opd_section_name(".opd"); // For ppc64
- // On Android the oatdata and the oatexec symbols in the oat files 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
+ // On Android the oatdata and the oatexec symbols in the oat and odex files 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.GetFileNameExtension() == ConstString("oat");
+ ConstString file_extension = m_file.GetFileNameExtension();
+ bool skip_oatdata_oatexec = file_extension == ConstString("oat") || file_extension == ConstString("odex");
ArchSpec arch;
GetArchitecture(arch);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22040.62851.patch
Type: text/x-patch
Size: 2649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160706/0a6008cb/attachment.bin>
More information about the lldb-commits
mailing list