diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-07 22:56:16 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-07 22:56:16 +0100 |
commit | 34991958d10d8b593a0847ebbcaf4aafb309161a (patch) | |
tree | 1868dd9b861899fe1d6cf3a9e8dbb362ea0a5ba5 | |
parent | 7f3637bcbba2d153525b685866f2110e56e2f84b (diff) | |
download | blog-34991958d10d8b593a0847ebbcaf4aafb309161a.zip blog-34991958d10d8b593a0847ebbcaf4aafb309161a.tar.gz blog-34991958d10d8b593a0847ebbcaf4aafb309161a.tar.bz2 |
notes: add Android GDB debugging
-rw-r--r-- | content/pages/notes.rst | 30 |
1 files changed, 30 insertions, 0 deletions
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. |