Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50200252 authored by John Michelau's avatar John Michelau
Browse files

Support gdb wrappers

Use gdbwrapper() for launching gdb.  This can be redefined to launch
one of the many gdb wrappers instead.

Example:
function gdbwrapper()
{
    ddd --debugger $ANDROID_TOOLCHAIN/$GDB -x "$@"
}

Change-Id: I3cce8a2ca1bae6d531e2388a93cb52075b21a42c
parent c47bea9d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -740,6 +740,11 @@ function systemstack()
    adb shell echo '""' '>>' /data/anr/traces.txt && adb shell chmod 776 /data/anr/traces.txt && adb shell kill -3 $(pid system_server)
}

function gdbwrapper()
{
    $ANDROID_TOOLCHAIN/$GDB -x "$@"
}

function gdbclient()
{
   local OUT_ROOT=$(get_abs_build_var PRODUCT_OUT)
@@ -796,7 +801,7 @@ function gdbclient()
       echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT"
       echo >>"$OUT_ROOT/gdbclient.cmds" ""

       $ANDROID_TOOLCHAIN/$GDB -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
       gdbwrapper "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
  else
       echo "Unable to determine build system output dir."
   fi