AnsweredAssumed Answered

Debug Android kernel with KGDB

Question asked by Leonardo Prates on Sep 2, 2016
Latest reply on Sep 2, 2016 by Leonardo Prates

I'm trying debug an Android kernel freeze with KGDB. Apparently I can connect to the target and 'c' command to continue kernel execution works. But after that if I try put some break point, for example, I get answer similar to that: 

 

(gdb) b goodix_i2c_write
Reply contains invalid hex digit 109

 

I'm calling gdb in this way: 

./arm-linux-androideabi-gdb ../../../../../../kernel_imx/vmlinux

 

And at start configs is:

 

GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../../../../../../kernel_imx/vmlinux...done.
(gdb) target remote localhost:5551
Remote debugging using localhost:5551

 

What's wrong?

 

Is my first experience with GDB. Is there a way to show exactly the last line before kernel freeze?

 

Thanks,

Leonardo

Outcomes