[Lldb-commits] [PATCH] Add filepath to qModuleInfo packet

Oleksiy Vyalov ovyalov at google.com
Tue Mar 10 16:29:59 PDT 2015


Please see my comments


================
Comment at: source/Host/android/HostInfoAndroid.cpp:47
@@ +46,3 @@
+FileSpec
+HostInfoAndroid::ResolveLibraryPath(const std::string& module_path, const ArchSpec& arch)
+{
----------------
How we can handle application's native libraries loaded into zygote process?

If application loads a library via System.loadLibrary a load path might have a following format:

/data/app/com.google.ovyalov.ndktest-1/lib/x86/libprober.so 

Depending on a target architecture x86 is replaced with arm64-v8a, armeabi, armeabi-v7a, mips, mips64 or x86_64.

As far as I can see from /proc/${PID}/environ there is no LD_LIBRARY_PATH variable - just LD_PRELOAD=libsigchain.so

================
Comment at: source/Host/android/HostInfoAndroid.cpp:88
@@ +87,3 @@
+    {
+        std::string path_candidate = path;
+        path_candidate += '/';
----------------
Could you use FileSpec here instead of path concatenation?

FileSpec file_candidate(path);
file_candidate.AppendPathComponent(module_path);

http://reviews.llvm.org/D8221

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list