Issue
I am trying to debug a crash in native code on Android (4.4.2), I used adb shell setprop debug.db.uid 999999
to start the debugger on crash. Logcat is showing the instructions to connect to the process, but I can't find any file gdbclient or gdbclient.py in the SDK or NDK. I saw some references online that it is part of the envsetup.sh script, but afaik that is only used for building the entire Android OS, not for application development.
I/DEBUG ( 5481): 400471fc ffe4f7ff d1064286 4629200f e8d6f00d
I/DEBUG ( 5481): 4004720c d03c2800 482ee02e f7fb4478 482debb6
I/DEBUG ( 5481): 4004721c e0154478 d11342b0 482b6a06 f7fb4478
I/DEBUG ( 5481): 4004722c 4a2aec2e 46332120 a801447a f92af013
I/DEBUG ( 5481): 4004723c a8012101 fc48f01a 46061c42 e011d104
I/DEBUG ( 5481): 4004724c 28006800 e02cd1e6 46294630 f00d4622
I/DEBUG ( 5481): 4004725c 1c43e912 d11e4607 f9c4f001 29046801
I/DEBUG ( 5481): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 15972
I/DEBUG ( 5481): ptrace detach from 16113 failed: No such process
I/DEBUG ( 5481): ********************************************************
I/DEBUG ( 5481): * Process 15972 has been suspended while crashing. To
I/DEBUG ( 5481): * attach gdbserver for a gdb connection on port 5039
I/DEBUG ( 5481): * and start gdbclient:
I/DEBUG ( 5481): *
I/DEBUG ( 5481): * gdbclient app_process :5039 15972
I/DEBUG ( 5481): *
I/DEBUG ( 5481): * Wait for gdb to start, then press HOME or VOLUME DOWN key
I/DEBUG ( 5481): * to let the process continue crashing.
I/DEBUG ( 5481): ********************************************************
Solution
gdbclient is a platform tool (i.e. the tool we use to run GDB when working on AOSP itself; not apps).
https://source.android.com/devices/tech/debug/gdb are the docs you're looking for, but unless you have the symbols for the device it's not going to be of much use (and trying to debug a KitKat device is yet another challenge).
Answered By - Dan Albert
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.