[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 09:47:33 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL274635: Add oat symbolization support for odex files (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D22040?vs=62851&id=62895#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D22040

Files:
  lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp

Index: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ lldb/trunk/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);
Index: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
===================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ lldb/trunk/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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22040.62895.patch
Type: text/x-patch
Size: 2715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160706/5b674138/attachment.bin>


More information about the lldb-commits mailing list