branch: master commit 7edc24482717d8e84683b969d386b644e75a9603 Author: rocky <ro...@gnu.org> Commit: rocky <ro...@gnu.org>
wrong args in jdb invocation; issue #51. Disable some jdb commands we can't support. --- realgud/common/cmds.el | 2 +- realgud/debugger/jdb/init.el | 13 ++++++++++--- realgud/debugger/jdb/jdb.el | 3 +-- realgud/debugger/nodejs/nodejs.el | 1 - test/.gitignore | 1 + test/HelloWorld.java | 6 ++++++ 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/realgud/common/cmds.el b/realgud/common/cmds.el index 8bbdd70..9ab344f 100644 --- a/realgud/common/cmds.el +++ b/realgud/common/cmds.el @@ -49,7 +49,7 @@ a shortcut for that key." (setq cmd default-cmd-template)) ) (if (equal cmd "*not-implemented*") - (message "Command %s is not implemented for this debugger" cmd) + (message "Command %s is not implemented for this debugger" cmd-name) ;; else (progn (realgud-command cmd arg no-record? frame-switch? realgud-prompts?) diff --git a/realgud/debugger/jdb/init.el b/realgud/debugger/jdb/init.el index 8962af1..0dac1dd 100644 --- a/realgud/debugger/jdb/init.el +++ b/realgud/debugger/jdb/init.el @@ -1,4 +1,4 @@ -;;; Copyright (C) 2014 Rocky Bernstein <ro...@gnu.org> +;;; Copyright (C) 2014-2015 Rocky Bernstein <ro...@gnu.org> (eval-when-compile (require 'cl)) (require 'load-relative) @@ -193,8 +193,15 @@ backtrace listing.") realgud-command-hash) realgud:jdb-command-hash) (setf (gethash "backtrace" realgud:jdb-command-hash) "where") -(setf (gethash "break" realgud:jdb-command-hash) "stop at %c:%l") -(setf (gethash "clear" realgud:jdb-command-hash) "clear %c:%l") + +;; For these we need to deal with java classpaths. +;; Also jdb is pretty sucky when it comes to giving an prompt that +;; we can write a regex for. So we don't even know often when there +;; is a prompt! +(setf (gethash "break" realgud:jdb-command-hash) "*not-implemented*") +(setf (gethash "clear" realgud:jdb-command-hash) "*not-implemented*") +(setf (gethash "restart" realgud:jdb-command-hash) "*not-implemented*") + (setf (gethash "continue" realgud:jdb-command-hash) "cont") (setf (gethash "finish" realgud:jdb-command-hash) "step up") (setf (gethash "up" realgud:jdb-command-hash) "up\C-Mwhere") diff --git a/realgud/debugger/jdb/jdb.el b/realgud/debugger/jdb/jdb.el index c85621e..4a6b3fa 100644 --- a/realgud/debugger/jdb/jdb.el +++ b/realgud/debugger/jdb/jdb.el @@ -85,8 +85,7 @@ fringe and marginal icons. (cl-remove-if 'nil (realgud:flatten parsed-args))) ) (realgud:run-process "jdb" script-name parsed-cmd-args - 'jdb-track-mode-hook - 'realgud:jdb-minibuffer-history no-reset) + 'realgud:jdb-track-mode-hook no-reset) ) ) diff --git a/realgud/debugger/nodejs/nodejs.el b/realgud/debugger/nodejs/nodejs.el index 59ad7e8..272b767 100644 --- a/realgud/debugger/nodejs/nodejs.el +++ b/realgud/debugger/nodejs/nodejs.el @@ -52,7 +52,6 @@ This should be an executable on your path, or an absolute file name." (declare-function nodejs-track-mode 'realgud-nodejs-track-mode) (declare-function nodejs-query-cmdline 'realgud:nodejs-core) (declare-function nodejs-parse-cmd-args 'realgud:nodejs-core) -(declare-function realgud:run-process 'realgud:run) ;;;###autoload (defun realgud:nodejs (&optional opt-cmd-line no-reset) diff --git a/test/.gitignore b/test/.gitignore index a350eb7..b616aaf 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,4 +1,5 @@ /*.elc /*~ +/HelloWorld.class /Makefile /Makefile.in diff --git a/test/HelloWorld.java b/test/HelloWorld.java new file mode 100644 index 0000000..27a5485 --- /dev/null +++ b/test/HelloWorld.java @@ -0,0 +1,6 @@ +public class HelloWorld { + public static void main(String[] args) { + String msg = "Hello, World!"; + System.out.println(msg); // Display the string. + } +}