Project

General

Profile

GDBDebugging » History » Version 22

Paul Kocialkowski, 06/30/2015 09:41 PM

1 22 Paul Kocialkowski
h1. GDB debugging
2 1 Denis 'GNUtoo' Carikli
3 22 Paul Kocialkowski
Here are some notes on debugging with gdb while rebasing Replicant changes on top of the latest CyanogenMod.
4 14 Denis 'GNUtoo' Carikli
5 1 Denis 'GNUtoo' Carikli
<pre>
6 12 Denis 'GNUtoo' Carikli
adb shell
7 18 Denis 'GNUtoo' Carikli
gdbserver 127.0.0.1:8022 --attach $(pidof mediaserver )
8 13 Denis 'GNUtoo' Carikli
</pre>
9 15 Denis 'GNUtoo' Carikli
10 10 Denis 'GNUtoo' Carikli
<pre>
11 2 Denis 'GNUtoo' Carikli
adb forward tcp:8022 tcp:8022
12 3 Denis 'GNUtoo' Carikli
</pre>
13
14
<pre>
15
. build/envsetup.sh
16 19 Denis 'GNUtoo' Carikli
lunch replicant_maguro-eng
17 3 Denis 'GNUtoo' Carikli
18
$ arm-linux-androideabi-gdb
19
GNU gdb (GDB) 7.1-android-gg2
20
Copyright (C) 2010 Free Software Foundation, Inc.
21
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
22
This is free software: you are free to change and redistribute it.
23
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
24
and "show warranty" for details.
25
This GDB was configured as "--host=i686-linux-gnu --target=arm-elf-linux".
26
For bug reporting instructions, please see:
27
<http://www.gnu.org/software/gdb/bugs/>.
28 1 Denis 'GNUtoo' Carikli
(gdb) set sysroot ./out/target/product/maguro/symbols/
29 9 Denis 'GNUtoo' Carikli
(gdb) set solib-search-path ./out/target/product/maguro/symbols/system/lib/:./out/target/product/maguro/symbols/system/lib/hw/:./out/target/product/maguro/symbols/system/vendor/lib/hw/
30 20 Denis 'GNUtoo' Carikli
(gdb) file ./out/target/product/maguro/symbols/system/bin/mediaserver
31
(gdb) target remote 127.0.0.1:8022
32 3 Denis 'GNUtoo' Carikli
33 1 Denis 'GNUtoo' Carikli
</pre>