From 34991958d10d8b593a0847ebbcaf4aafb309161a Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Wed, 7 Dec 2016 22:56:16 +0100 Subject: notes: add Android GDB debugging --- content/pages/notes.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/pages/notes.rst b/content/pages/notes.rst index c578a6b..4ab6ea3 100644 --- a/content/pages/notes.rst +++ b/content/pages/notes.rst @@ -153,3 +153,33 @@ Then sign all the modified repos: repo forall $(repo forall -c ' echo "$REPO_REMOTE$REPO_PROJECT" | grep fossencdi | cut -c10-') \ -c ' git tag -s replicant-6.0-alpha-0002 -m "second alpha release of Replicant 6.0" && \ git push git@fossencdi.org:$REPO_PROJECT replicant-6.0-alpha-0002 ' + +GDB debugging +------------- + +Set the path of your Android GDB installation in the development repo, e.g.: + +.. code-block:: diff + + diff --git a/scripts/gdbclient b/scripts/gdbclient + index 8ff9ae9..5357d38 100755 + --- a/scripts/gdbclient + +++ b/scripts/gdbclient + @@ -34,7 +34,7 @@ function gdbwrapper() + { + local GDB_CMD="$1" + shift 1 + - $GDB_CMD -x "$@" + + toolchain/gdb/install/bin/arm-elf-linux-gdb -x "$@" + } + + function gdbclient() { + +Get a gdbserver binary, push it to the device and start it for the binary you want to monitor. An example for debugging surfaceflinger: + +.. code-block:: shell + + adb push gdbserver /system/bin/ + adb shell "gdbserver 127.0.0.1:5039 /system/bin/surfaceflinger" & + +Then run the gdbclient script with the PID as option. -- cgit v1.1