|Summary:||Gdb.env contains the wrong file name for `app_process` when failing to pull `app_process`|
|Product:||Android||Reporter:||Peter Collins <peter.collins>|
|Target Milestone:||6.1 (C7)|
|Tags:||Is this bug a regression?:||---|
|Last known good build:|
Description Peter Collins 2015-04-01 15:29:02 UTC
In Android 5.0 and greater, app_process is now a symlink to app_process32 (on 32-bit devices, presumably this would be app_process64 on 64-bit). In the gdb target output we can see that pulling /system/bin/app_process fails, which is then followed by an attempt to pull /system/bin/app_process32. Unfortunately in this case `app_process` file path is the one written to gdb.env which results in a failure when executing gdb. _Gdb target output: https://gist.github.com/pjcollins/6ea28904bd16ca9a9425 More context: http://stackoverflow.com/questions/26530675/ndk-debugging-ndk-gdb-fails-to-pull-app-process-who-and-when-creates-the-app-p Environment: OSX Yosemite XA master/ 1e7c3b859961
Comment 1 Peter Collins 2015-04-01 16:15:08 UTC
It looks like my initial description isn't entirely correct after further investigation on a couple different Android 5.0+ devices. I am able to `adb pull /system/bin/app_process` on everything but this samsung device.
Comment 2 dean.ellis 2015-06-10 08:54:32 UTC
peter. does the samsung device pull the app_process32 ok? I'm thinking of adding a check to see if app_process32 exists before writing that to the gdb.env file and if it doesn't then check for app_process. And then if neither exist log an error. not sure that would be the correct order though, check 32 first or the other way around.
Comment 3 Peter Collins 2015-06-10 09:48:54 UTC
Yes in this case the device did pull the app_process32 file without issue. I was also then able to manually edit my gdb.env file to replace the 'app_process' string with 'app_process32' and continue debugging. In the log I posted it shows the attempt to pull app_process is occurring _before_ app_process32, however I'm not sure if this consistent. Executing: .../adb pull /system/bin/app_process /Users/petercollins/Downloads/Test/Test//gdb-symbols failed to copy '/system/bin/app_process' to '/Users/petercollins/Downloads/Test/Test//gdb-symbols/app_process': Permission denied Executing: ../adb pull /system/bin/app_process32 /Users/petercollins/Downloads/Test/Test//gdb-symbols 595 KB/s (13588 bytes in 0.022s)
Comment 4 dean.ellis 2015-11-03 12:10:27 UTC
Fixed in monodroid/master/e6a53420