[Lldb-commits] [lldb] r274635 - Add oat symbolization support for odex files

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 6 09:40:10 PDT 2016


Author: tberghammer
Date: Wed Jul  6 11:40:09 2016
New Revision: 274635

URL: http://llvm.org/viewvc/llvm-project?rev=274635&view=rev
Log:
Add oat symbolization support for odex files

Differential revision: http://reviews.llvm.org/D22040

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

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=274635&r1=274634&r2=274635&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Jul  6 11:40:09 2016
@@ -2184,15 +2184,16 @@ ObjectFileELF::ParseSymbols (Symtab *sym
     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);

Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=274635&r1=274634&r2=274635&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Wed Jul  6 11:40:09 2016
@@ -317,8 +317,9 @@ PlatformAndroid::DownloadSymbolFile (con
                                      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())




More information about the lldb-commits mailing list