]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Android only: make the debuginfo mapping hack more flexible.
authorJulian Seward <jseward@acm.org>
Mon, 27 Feb 2012 11:02:20 +0000 (11:02 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 27 Feb 2012 11:02:20 +0000 (11:02 +0000)
Previously it looked for the debuginfo object for "/system/X" in
"/sdcard/symbols/system/X".  This commit removes the requirement for
"system" as the first path component, so the mapping is now "/X" (viz,
any absolute path) to "/sdcard/symbols/X".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12406

coregrind/m_debuginfo/readelf.c

index 046fe0da1035c7f0bc75e1ae169389daab29b6ef..7e2e771a598aa529c771d25ee62d171116730f15 100644 (file)
@@ -1090,8 +1090,8 @@ Bool find_ad_hoc_debug_image( struct _DebugInfo* di,
 #  else /* android specific hacks; look away now. */
 
    /* The deal is: if we're looking for for a debuginfo file for some
-      object /system/blah (where blah can be any path), see if we can
-      find the file /sdcard/symbols/system/blah.  So for example it
+      object /path/to/object (which can be any path), see if we can
+      find the file /sdcard/symbols/path/to/object.  So for example it
       produces the following mappings, both of which are important for
       Memcheck:
 
@@ -1109,7 +1109,7 @@ Bool find_ad_hoc_debug_image( struct _DebugInfo* di,
       But beware: there is no checking that the debuginfo file, if
       found, matches the main file in any way.
    */
-   if (0 != VG_(strncmp)(filename, "/system/", 8))
+   if (!filename || *filename != '/')
       return False;
 
    HChar* nm = ML_(dinfo_zalloc)("di.fahdi.1",