aboutsummaryrefslogtreecommitdiffstats
path: root/java/debug.sh
diff options
context:
space:
mode:
Diffstat (limited to 'java/debug.sh')
-rwxr-xr-xjava/debug.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/debug.sh b/java/debug.sh
index cbef7518984..30e5a94eee5 100755
--- a/java/debug.sh
+++ b/java/debug.sh
@@ -32,6 +32,7 @@ jdb_port=64013
32jdb=no 32jdb=no
33attach_existing=no 33attach_existing=no
34gdbserver= 34gdbserver=
35gdb=gdb
35 36
36while [ $# -gt 0 ]; do 37while [ $# -gt 0 ]; do
37 case "$1" in 38 case "$1" in
@@ -51,6 +52,7 @@ while [ $# -gt 0 ]; do
51 echo " --port PORT run the GDB server on a specific port" 52 echo " --port PORT run the GDB server on a specific port"
52 echo " --jdb-port PORT run the JDB server on a specific port" 53 echo " --jdb-port PORT run the JDB server on a specific port"
53 echo " --jdb run JDB instead of GDB" 54 echo " --jdb run JDB instead of GDB"
55 echo " --gdb use specified GDB binary"
54 echo " --attach-existing attach to an existing process" 56 echo " --attach-existing attach to an existing process"
55 echo " --gdbserver BINARY upload and use the specified gdbserver binary" 57 echo " --gdbserver BINARY upload and use the specified gdbserver binary"
56 echo " --help print this message" 58 echo " --help print this message"
@@ -65,6 +67,10 @@ while [ $# -gt 0 ]; do
65 "--jdb" ) 67 "--jdb" )
66 jdb=yes 68 jdb=yes
67 ;; 69 ;;
70 "--gdb" )
71 shift
72 gdb=$1
73 ;;
68 "--gdbserver" ) 74 "--gdbserver" )
69 shift 75 shift
70 gdbserver=$1 76 gdbserver=$1
@@ -355,4 +361,4 @@ fi
355 361
356# Finally, start gdb with any extra arguments needed. 362# Finally, start gdb with any extra arguments needed.
357cd "$oldpwd" 363cd "$oldpwd"
358gdb --eval-command "target remote localhost:$gdb_port" $gdbargs 364$gdb --eval-command "target remote localhost:$gdb_port" $gdbargs