Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3375)

Unified Diff: build/android/adb_gdb

Issue 2943673002: Allow using cgdb with adb_gdb script. (Closed)
Patch Set: Fix nits. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_gdb
diff --git a/build/android/adb_gdb b/build/android/adb_gdb
index f9e372617f0bae2d9332ddc24ccfd0786444e5a8..9b8f5be68c8907e6cb6b067148958acdda06b651 100755
--- a/build/android/adb_gdb
+++ b/build/android/adb_gdb
@@ -87,6 +87,7 @@ ADB=
ANNOTATE=
FORCE=
GDBEXEPOSTFIX=gdb
+CGDB=
GDBINIT=
GDBSERVER=
HELP=
@@ -206,6 +207,12 @@ for opt; do
--ui)
GDBEXEPOSTFIX=gdbtui
;;
+ --cgdb)
+ CGDB=cgdb
+ ;;
+ --cgdb=*)
+ CGDB=$optarg
+ ;;
--verbose)
VERBOSE=$(( $VERBOSE + 1 ))
;;
@@ -306,6 +313,7 @@ Valid options:
--help|-h|-? Print this message.
--verbose Increase verbosity.
+ --cgdb[=<file>] Use cgdb (an interface for gdb that shows the code).
--sandboxed Debug first sandboxed process we find.
--sandboxed=<num> Debug specific sandboxed process.
--symbol-dir=<path> Specify directory with symbol shared libraries.
@@ -1047,5 +1055,9 @@ if [ "$VERBOSE" -gt 0 ]; then
fi
log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS"
-$GDB $GDB_ARGS -x $COMMANDS &&
+if [ "$CGDB" ]; then
+ $CGDB -d $GDB -- $GDB_ARGS -x $COMMANDS
+else
+ $GDB $GDB_ARGS -x $COMMANDS
+fi
rm -f "$GDBSERVER_PIDFILE"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698