1 ;;; jde-jdb.el -- Debugger mode for jdb.
2 ;; $Revision: 1.48 $ $Date: 2005/01/18 05:23:30 $
4 ;; Author: Paul Kinnucan <paulk@mathworks.com>x
5 ;; Maintainer: Paul Kinnucan
6 ;; Keywords: java, tools
8 ;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005 Paul Kinnucan.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, US
26 ;; This package interfaces emacs to jdb, the debugger
27 ;; distributed as part of JavaSoft's Java
28 ;; Development Kit (JDK).
30 ;; Please send bug reports and enhancement suggestions
31 ;; to Paul Kinnucan at <paulk@mathworks.com>
33 ;; See end of this file for change history.
40 ;; Thanks to "David J. Biesack" <sasdjb@unx.sas.com> for this function
41 ;; and its use in jde-db-marker-filter.
42 ;; Amended by "Patrick J. McNerthney" <pat@mcnerthney.com> to allow
43 ;; package names to begin with underscores.
44 (defun jde-jdb-make-qualified-class-name-regexp (class)
45 "Constructs a regular expression to extract a qualified class name from a jdb
47 (concat "\\(\\(\\(\\(\\w\\|[_]\\)*\\.\\)*\\)" class "\\)\\(\\b\\|\\$\\)"))
50 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52 ;; jdb Debugger Commands ;;
54 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56 ;; Launch debuggee command
59 (defclass jde-jdb-cmd-launch (jde-db-cmd-launch) ()
60 "Asks jdb to launch a debuggee process.")
62 (defmethod jde-db-cmd-launch-buffer-name ((this jde-jdb-cmd-launch))
63 "Return the name of the buffer for this process. Descendant
64 classes should override this method to create a name that is appropriate
65 for the process being launched, e.g., an applet or application." nil)
67 (defmethod jde-db-cmd-launch-cmd-path ((this jde-jdb-cmd-launch))
68 "Return the path of the command to be used to launch the process. Descendant
69 classes should override this method to return a path appropriate to
70 the command to be used to launch the debuggee process, e.g., jdb or
74 (defmethod jde-db-cmd-launch-startup-cmds ((this jde-jdb-cmd-launch))
75 "Add commands to debugger's initial command queue. Derived classes
76 should override this method to specify commands that should be
77 executed immediately after the debugger starts, e.g., an initial
81 (defmethod jde-db-cmd-init ((this jde-jdb-cmd-launch))
82 "The debugger invokes this method before executing the launch
83 command. Launch the debuggee process."
84 (let ((debugger (oref this debugger)))
86 (not (slot-boundp debugger 'buffer))
87 (not (oref debugger :buffer))
88 (not (comint-check-proc (oref debugger :buffer))))
90 (oref debugger debuggee))
91 (source-directory default-directory)
93 (jde-db-debugger-get-working-dir debugger))
94 (prog-args (jde-db-debugger-get-prog-args debugger))
95 (cmd-path (jde-db-cmd-launch-cmd-path this))
99 (jde-run-make-arg-string prog-args) "\n\n")))
101 (oset debugger :buffer-name (jde-db-cmd-launch-buffer-name this))
102 (oset debugger :buffer (get-buffer-create (oref debugger :buffer-name)))
104 (jde-db-cmd-launch-startup-cmds this)
106 (oset debugger :path cmd-path)
107 (jde-db-jdb-start debugger prog-args command-string)
109 (let ((debuggee-status (oref debuggee status)))
110 (oset debuggee-status running-p t)
111 (oset debuggee-status stopped-p t)))
113 (message "An instance of %s is running." (oref this :buffer-name))
114 (pop-to-buffer (oref this :buffer-name))))))
116 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-launch))
117 "Returns nil because jdb launches the debuggee application automatically
118 when it is started." nil)
121 ;; Launch application command
123 (defclass jde-jdb-cmd-launch-app (jde-jdb-cmd-launch
124 jde-db-cmd-launch-app) ()
125 "Asks jdb to launch the debuggee application.")
127 (defmethod initialize-instance ((this jde-jdb-cmd-launch-app) &rest fields)
129 (oset this name "launch application in jdb debug mode"))
131 (defmethod jde-db-cmd-launch-cmd-path ((this jde-jdb-cmd-launch-app))
132 "Return the path of the jdb command."
133 (let* ((debugger (oref this :debugger)))
134 (oref debugger :path)))
136 (defmethod jde-db-cmd-launch-buffer-name ((this jde-jdb-cmd-launch-app))
137 (let* ((debugger (oref this :debugger))
138 (debuggee (oref debugger :debuggee))
139 (main-class (oref debuggee :main-class)))
140 (concat "*debug" main-class "*")))
142 (defmethod jde-db-cmd-launch-startup-cmds ((this jde-jdb-cmd-launch-app))
143 "If `jde-db-initial-step-p' is nonnil, add a step command to the
144 debugger's startup command queue."
145 (if jde-db-initial-step-p
146 (let* ((debugger (oref this debugger))
147 (step-cmd (oref (oref debugger cmd-set) step-into)))
148 (oset debugger next-cmd
149 (append (oref debugger next-cmd) (list step-cmd))))))
152 ;; Launch applet command
154 (defclass jde-jdb-cmd-launch-applet (jde-jdb-cmd-launch
155 jde-db-cmd-launch-applet) ()
156 "Asks jdb to launch the debuggee applet.")
158 (defmethod initialize-instance ((this jde-jdb-cmd-launch-applet) &rest fields)
160 (oset this name "launch applet in jdb debug mode"))
162 (defmethod jde-db-cmd-launch-cmd-path ((this jde-jdb-cmd-launch-applet))
163 "Return the path of the command to be used to launch the process. Descendant
164 classes should override this method to return a path appropriate to
165 the command to be used to launch the debuggee process, e.g., jdb or
167 (let* ((debugger (oref this :debugger))
168 (jdb-path (oref debugger :path))
169 (jdb-dir (file-name-directory jdb-path)))
170 (expand-file-name "appletviewer" jdb-dir)))
172 (defmethod jde-db-cmd-launch-buffer-name ((this jde-jdb-cmd-launch-applet))
173 (let* ((debugger (oref this :debugger))
174 (debuggee (oref debugger :debuggee))
175 (doc (oref debuggee :doc)))
176 (concat "*debug" (file-name-nondirectory doc) "*")))
178 (defmethod jde-db-cmd-launch-startup-cmds ((this jde-jdb-cmd-launch-applet))
179 "If `jde-db-initial-step-p' is nonnil, add a run command followed by a
180 step command to the debugger's startup command queue."
181 (if jde-db-initial-step-p
182 (let* ((debugger (oref this debugger))
183 (cmd-set (oref debugger cmd-set))
184 (run-cmd (oref cmd-set run))
185 (step-cmd (oref cmd-set step-into)))
186 (oset debugger next-cmd
188 (oref debugger next-cmd)
196 (defclass jde-jdb-cmd-run (jde-db-cmd) ()
197 "Asks jdb to start the debuggee application.")
199 (defmethod initialize-instance ((this jde-jdb-cmd-run) &rest fields)
201 (oset this name "run"))
203 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-run))
204 "Creates command line for jdb run command."
209 (defclass jde-jdb-cmd-cont (jde-db-cmd) ()
210 "Asks jdb to continue the debuggee application from its current
213 (defmethod initialize-instance ((this jde-jdb-cmd-cont) &rest fields)
215 (oset this name "cont"))
217 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-cont))
218 "Creates command line for jdb cont command."
223 (defclass jde-jdb-cmd-quit (jde-db-cmd) ()
224 "Quit debugging the current application.")
226 (defmethod initialize-instance ((this jde-jdb-cmd-quit) &rest fields)
228 (oset this name "quit"))
230 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-quit))
231 "Creates command line for jdb quit command."
236 (defclass jde-jdb-cmd-step-over (jde-db-cmd) ()
237 "Step to the next line in the current frame.")
239 (defmethod initialize-instance ((this jde-jdb-cmd-step-over) &rest fields)
241 (oset this name "next"))
243 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-step-over))
244 "Creates command line for jdb step-over command."
249 (defclass jde-jdb-cmd-step-into (jde-db-cmd) ()
250 "Step to the next line in the current program.")
252 (defmethod initialize-instance ((this jde-jdb-cmd-step-into) &rest fields)
254 (oset this name "step"))
256 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-step-into))
257 "Creates command line for jdb step-into command."
262 (defclass jde-jdb-cmd-step-out (jde-db-cmd) ()
263 "Continue to the end of the current method.")
265 (defmethod initialize-instance ((this jde-jdb-cmd-step-out) &rest fields)
267 (oset this name "step up"))
269 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-step-out))
270 "Creates command line for jdb step-out command."
276 (defclass jde-jdb-cmd-up (jde-db-cmd) ()
277 "Move up one stack frame.")
279 (defmethod initialize-instance ((this jde-jdb-cmd-up) &rest fields)
281 (oset this name "up"))
283 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-up))
284 "Creates command line for jdb up command."
287 (defmethod jde-db-cmd-notify-response ((this jde-jdb-cmd-up) response)
288 "Invoked when the debugger responds to the command. RESPONSE
289 is the response. This method invokes the jdb where
290 command in order to position the debug pointer at the
291 current stack location."
293 (let* ((jdb (oref this debugger))
294 (cmds (oref jdb cmd-set))
295 (cmd (oref cmds where)))
296 (jde-db-exec-cmd jdb cmd)))
298 ;; Down stack command
300 (defclass jde-jdb-cmd-down (jde-db-cmd) ()
301 "Move down one stack frame.")
303 (defmethod initialize-instance ((this jde-jdb-cmd-down) &rest fields)
305 (oset this name "down"))
307 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-down))
308 "Creates command line for jdb down command."
311 (defmethod jde-db-cmd-notify-response ((this jde-jdb-cmd-down) response)
312 "Invoked when the debugger responds to the command. RESPONSE
313 is the response. This method invokes the jdb where
314 command in order to position the debug pointer at the
315 current stack location."
317 (let* ((jdb (oref this debugger))
318 (cmds (oref jdb cmd-set))
319 (cmd (oref cmds where)))
320 (jde-db-exec-cmd jdb cmd)))
323 ;; Where stack command
325 (defclass jde-jdb-cmd-where (jde-db-cmd) ()
326 "Point to current location on the stack.")
328 (defmethod initialize-instance ((this jde-jdb-cmd-where) &rest fields)
330 (oset this name "where"))
332 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-where))
333 "Creates command line for jdb where command."
336 (defmethod jde-db-cmd-notify-response ((this jde-jdb-cmd-where) output)
337 "Processes the output of the jdb where
338 command, which lists the current stack. An example of the output
341 [1] jmath.LinearSystem$InnerClass.print (LinearSystem.java:36)
342 [2] jmath.LinearSystem.<init> (LinearSystem.java:52)
343 [3] jmath.Test.main (Test.java:38)
345 This method positions the source line cursor at the position that
346 matches the current location of the debugger in the program's
347 stack (set by the jdb up and down stack commands)."
348 (let* ((jdb (oref this debugger))
349 (debuggee (oref jdb debuggee)))
350 ;; if the stack depth is not set default to 1
351 (if (string-equal "" (oref debuggee :stack-depth))
352 (oset debuggee :stack-depth "1"))
355 (oref debuggee :stack-depth)
356 "\\] .*(\\([^\$\n]*\\).*:\\([0-9]*[^[:digit:]]?[0-9]+\\))")
358 (let ((marker (match-string 0 output))
359 (class (match-string 1 output))
360 (line-no (jde-jdb-string-to-int (match-string 2 output)))
363 (if (equal ".java" (substring class -5))
364 (setq class (substring class 0 -5)))
366 ;; Extract package path from input.
367 (let ((case-fold-search nil)) ;; Make sure search is case-sensitive
368 (and (string-match (jde-jdb-make-qualified-class-name-regexp class) marker)
370 (substring marker (match-beginning 2) (match-end 2)))))
371 (jde-db-set-debug-cursor
372 (if package (concat package class) class)
373 (concat class ".java") line-no)))
376 ;; Set Breakpoint command
378 (defclass jde-jdb-cmd-set-breakpoint (jde-db-cmd-breakpoint) ()
379 "Asks jdb to set the breakpoint specified by the
382 (defmethod initialize-instance ((this jde-jdb-cmd-set-breakpoint) &rest fields)
384 (oset this name "stop at"))
386 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-set-breakpoint))
387 "Creates command line for jdb set breakpoint command."
388 (let* ((bps (oref this breakpoints))
390 (format "stop at %s:%d"
392 (jde-db-breakpoint-get-line bp))))
394 (defmethod jde-db-cmd-notify-response ((this jde-jdb-cmd-set-breakpoint) output)
395 "Called when the debugger responds to the last set-breakpoint
396 command. Invokes `jde-db-mark-breakpoint-requested' on the breakpoint and
397 updates the breakpoint to `requested' status. Removes the breakpoint
398 from the command's breakpoint list. If the list contains more
399 breakpoints, this method reissues the command on the next breakpoint
401 ;; (message "set-bp resp <<%s>>" output)
403 (string-match "Deferring breakpoint" output)
404 (string-match "Set breakpoint" output)
405 (string-match "Unable to set" output))
406 (let* ((bps (oref this breakpoints))
407 (bp (car bps)) file line)
410 (setq file (oref bp file))
411 (setq line (jde-db-breakpoint-get-line bp))
412 (if (string-match "Unable to set breakpoint" output)
413 (jde-db-delete-breakpoint bp)
414 (if (string-match "Unable to set deferred breakpoint" output)
415 (if (jde-db-debuggee-running-p)
416 (let* ((debugger (oref 'jde-db-debugger the-debugger))
418 (oref (oref debugger cmd-set) clear-bp)))
419 (oset bp-cmd breakpoints (list bp))
420 (jde-db-exec-cmd debugger bp-cmd))
421 (jde-db-delete-breakpoint bp))
422 (if (string-match "Deferring breakpoint" output)
424 (oset bp status 'requested)
425 (jde-db-mark-breakpoint-requested file line))
426 (if (string-match "Set breakpoint" output)
428 (oset bp status 'active)
429 (jde-db-mark-breakpoint-active file line))))))
431 (oset this breakpoints bps)
433 (let ((jdb (oref this debugger)))
434 (jde-db-exec-cmd jdb this))))))))
436 ;; Clear Breakpoint command
438 (defclass jde-jdb-cmd-clear-breakpoint (jde-db-cmd-breakpoint) ()
439 "Asks jdb to clear the breakpoint specified by the
442 (defmethod initialize-instance ((this jde-jdb-cmd-clear-breakpoint) &rest fields)
444 (oset this name "clear"))
446 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-clear-breakpoint))
447 "Creates command line for jdb clear breakpoint command."
448 (let* ((bps (oref this breakpoints))
450 (format "clear %s:%d"
452 (jde-db-breakpoint-get-line bp))))
454 (defmethod jde-db-cmd-notify-response ((this jde-jdb-cmd-clear-breakpoint) output)
455 "Called when the debugger responds to the last clear-breakpoint command.
456 Removes the breakpoint from the command's breakpoint list. If the list contains
457 more breakpoints, this method reissues the clear command on the next breakpoint
459 (let* ((bps (oref this breakpoints))
461 (jde-db-delete-breakpoint bp)
463 (oset this breakpoints bps)
465 (let ((jdb (oref this debugger)))
466 (jde-db-exec-cmd jdb this)))))
469 (defvar jde-jdb-cmd-print-history nil)
471 (defclass jde-jdb-cmd-print (jde-db-cmd)
472 ((expr :initarg :expr
476 "Expression passed to jdb"))
477 "Asks jdb to print value of expression at point")
479 (defmethod initialize-instance ((this jde-jdb-cmd-print) &rest fields)
481 (oset this name "print")
484 (defmethod jde-db-cmd-init ((this jde-jdb-cmd-print))
485 "The debugger invokes this method before executing the
487 (oset this expr (read-from-minibuffer "expr: " (thing-at-point 'word)
488 nil nil 'jde-jdb-cmd-print-history)))
490 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-print))
491 "Creates a command line for jdb print command."
497 (defclass jde-jdb-cmd-dump (jde-jdb-cmd-print) ()
498 "Asks jdb to print all object information of the expression at point")
500 (defmethod initialize-instance ((this jde-jdb-cmd-dump) &rest fields)
502 (oset this name "dump"))
505 (defclass jde-jdb-cmd-eval (jde-jdb-cmd-print) ()
506 "Ask jdb to evaluate the expression(Same as the print command)")
508 (defmethod initialize-instance ((this jde-jdb-cmd-eval) &rest fields)
510 (oset this name "eval"))
513 (defclass jde-jdb-cmd-set-var (jde-jdb-cmd-print)
514 ((value :initarg :value
518 "Value to assign to the variable"))
519 "Ask jdb to assign new value to a field/variable/array element")
521 (defmethod initialize-instance ((this jde-jdb-cmd-set-var) &rest fields)
523 (oset this name "set"))
525 (defmethod jde-db-cmd-init ((this jde-jdb-cmd-set-var))
526 "The debugger invokes this method before executing the
528 (oset this expr (read-from-minibuffer "variable: " (thing-at-point 'word)
529 nil nil 'jde-jdb-cmd-print-history))
530 (oset this value (read-from-minibuffer "value: " nil
533 (defmethod jde-db-cmd-make-command-line ((this jde-jdb-cmd-set-var))
534 "Creates a command line for jdb print command."
541 (defclass jde-jdb-cmd-locals (jde-jdb-cmd-print) ()
542 "Ask jdb to print al local variables in current stack frame")
544 (defmethod initialize-instance ((this jde-jdb-cmd-locals) &rest fields)
546 (oset this name "locals"))
548 (defmethod jde-db-cmd-init ((this jde-jdb-cmd-locals))
549 "The debugger invokes this method before executing the
555 (defclass jde-jdb-cmd-set (jde-db-cmd-set)
556 ((print :initarg :print
557 :type jde-jdb-cmd-print
559 "Asks jdb to print the value of expression at point")
561 :type jde-jdb-cmd-dump
563 "Ask jdb to print all object information from the
564 expression at poing")
566 :type jde-jdb-cmd-eval
568 "Ask jdb to evaluate the expression at point")
569 (set-var :initarg :set-var
570 :type jde-jdb-cmd-set-var
572 "Ask jdb to assign a new value to the expression at point")
573 (locals :initarg :locals
574 :type jde-jdb-cmd-locals
576 "Ask jdb to print all local variables in current stack frame")
578 "Set of debugger commands implemented by jdb.")
580 (defmethod initialize-instance ((this jde-jdb-cmd-set) &rest fields)
581 "Construct jdb command set."
583 (let ((jdb (oref this debugger)))
584 (oset this launch-app
585 (jde-jdb-cmd-launch-app "launch" :debugger jdb))
586 (oset this launch-applet
587 (jde-jdb-cmd-launch-applet "launch" :debugger jdb))
589 (jde-jdb-cmd-run "run" :debugger jdb))
591 (jde-jdb-cmd-cont "cont" :debugger jdb))
593 (jde-jdb-cmd-quit "jdb quit" :debugger jdb))
595 (jde-jdb-cmd-step-over "jdb step-over cmd" :debugger jdb))
597 (jde-jdb-cmd-step-into "jdb step-into cmd" :debugger jdb))
599 (jde-jdb-cmd-step-out "jdb step-out cmd" :debugger jdb))
601 (jde-jdb-cmd-up "jdb up cmd" :debugger jdb))
603 (jde-jdb-cmd-down "jdb down cmd" :debugger jdb))
605 (jde-jdb-cmd-where "jdb where cmd" :debugger jdb))
607 (jde-jdb-cmd-set-breakpoint "jdb set breakpoint" :debugger jdb))
609 (jde-jdb-cmd-clear-breakpoint "jdb clear breakpoint" :debugger jdb))
611 (jde-jdb-cmd-print "jdb print cmd" :debugger jdb))
613 (jde-jdb-cmd-dump "jdb dump cmd" :debugger jdb))
615 (jde-jdb-cmd-eval "jdb eval cmd" :debugger jdb))
617 (jde-jdb-cmd-set-var "jdb set cmd" :debugger jdb))
619 (jde-jdb-cmd-locals "jdb locals cmd" :debugger jdb))
622 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
624 ;; jdb Breakpoint Listener ;;
626 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
627 (defclass jde-jdb-breakpoint-listener (jde-db-listener)
628 ((marker-regexp :initarg :marker-regexp
631 "Regular expression for parsing breakpoint messages.")
632 (class-index :initarg :class-index
636 "Index of class name parsed by marker-regex")
637 (line-index :initarg :line-index
641 "Index of line number parsed by marker-regex")
642 (noline-regexp :initarg :noline-regexp
645 "Regular expression for parsing breakpoint messages without line numbers.")
646 ;; There's no guarantee that Emacs will hand the filter the entire
647 ;; marker at once; it could be broken up across several strings. We
648 ;; might even receive a big chunk with several markers in it. If we
649 ;; receive a chunk of text which looks like it might contain the
650 ;; beginning of a marker, we save it here between calls to the
652 (marker-acc :initarg :marker-acc
656 "Debug output accumulator")
659 "Handles jdb breakpoint events.")
662 (defmethod initialize-instance ((this jde-jdb-breakpoint-listener) &rest fields)
663 "Construct breakpoint listener."
667 ;; Regular expression used to find a jdb breakpoint position marker.
668 ;; The regular expression must have two subexpressions. The first matches
669 ;; the name of the class in which the breakpoint occurs; the second, the
670 ;; line number at which the breakpoint occurs. The default expression
671 ;; matches breakpoint messages emitted by jdb. You may need to change
672 ;; the expression to accommodate other debuggers."
676 "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^\$]*\\)\\(\$.*\\)*[.].+(), line=\\([0-9,.]*\\),")
677 ;; Regular expression to match a breakpoint message that lacks a line
678 ;; number because the breakpoint occurs in a class compiled without deug
683 "^Breakpoint hit: .*(pc \\([0-9]*\\))"))
687 (defmethod jde-jdb-fixup-output ((this jde-jdb-breakpoint-listener))
688 ;; This is a hack to accommodate reorder of message chunks
689 ;; on Solaris at debugger startup.
690 (if (string-match "running ...\n" (oref this :marker-acc))
691 (oset this :marker-acc
692 (concat "running ...\n"
693 (substring (oref this :marker-acc) 0 (match-beginning 0))
694 (substring (oref this :marker-acc) (match-end 0)))))
697 ;; This is a hack to fix reordering of message chunks on Windows 2000
698 ;; The problem is the debugger prompt - the thread name with the stack
699 ;; depth (eg main[1]) - sometimes shows up in the middle of the output
700 ;; from the command sent to the debugger.
701 ;; This seems to show up most often with step commands.
702 ;;(message "checking string %s" (oref jdb :marker-acc))
703 (if (string-match "^.*: \\([-a-zA-Z0-9_$]+\\[[0-9]+\\] \\)thread="
704 (oref this :marker-acc))
705 (oset this :marker-acc
706 (concat (match-string 1 (oref this :marker-acc))
707 (substring (oref this :marker-acc) 0 (match-beginning 1))
708 (substring (oref this :marker-acc) (match-end 1)))))
709 ;; (message "fixed string is %s" jde-db-marker-acc)
713 (defmethod jde-jdb-set-breakpoint-listener ((this jde-jdb-breakpoint-listener) output)
714 "Listens for set breakpoint messages."
715 (let ((msgs (split-string output "\n")))
716 (loop for msg in msgs do
717 (if (and (string-match
718 "^.*Set .*breakpoint \\(.*\\):\\([0-9]+\\)"
720 (not (string-match "Unable to set.*" msg)))
721 (let* ((class (substring
730 (source-buffer (jde-db-find-class-source class))
731 (path (buffer-file-name source-buffer))
732 (bp (jde-db-find-breakpoint path line)))
733 (oset bp status 'active)
734 (jde-db-mark-breakpoint-active path line))))))
736 (defmethod jde-db-listener-filter-output ((this jde-jdb-breakpoint-listener) input)
737 "Filters the output of the debugger."
738 (let ((jdb (oref this debugger))
741 ;; Accumulate next chunk of debugger output.
744 (oref this :marker-acc)
747 ;; (message (format "<acc-start>%s<acc-end>" (oref this :marker-acc)))
749 (jde-jdb-fixup-output this)
751 (let* ((marker-regexp (oref this :marker-regexp))
752 (marker-regexp-class-index (oref this :class-index))
753 (marker-regexp-line-index (oref this :line-index)))
755 ;; (message (concat "jdb output:" input))
756 ;; (message (concat "acc = " jde-db-marker-acc))
758 ;; Process all the complete markers in this chunk.
759 (if (string-match marker-regexp (oref this :marker-acc))
760 ;; Extract the frame position from the marker.
761 (let ((premarker (substring
762 (oref this :marker-acc) 0 (match-beginning 0)))
763 (marker (substring (oref this :marker-acc)
764 (match-beginning 0) (match-end 0)))
765 (rest (substring (oref this :marker-acc) (match-end 0)))
767 (oref this :marker-acc)
768 (match-beginning marker-regexp-class-index)
769 (match-end marker-regexp-class-index)))
770 (line-no (jde-jdb-string-to-int
772 (oref this :marker-acc)
773 (match-beginning marker-regexp-line-index)
774 (match-end marker-regexp-line-index))))
776 ;; Extract package path from input.
777 (let ((case-fold-search nil)) ;; Make sure search is case-sensitive
778 (and (string-match (jde-jdb-make-qualified-class-name-regexp class) marker)
780 (substring marker (match-beginning 2) (match-end 2))))
782 ;; (message "jde-db package: %s. marker = %s" jde-db-last-package marker)
783 ;;(message "case-fold-search = %s" (if case-fold-search "true" "false"))
786 ;; Insert debugger output into debugger buffer.
787 (setq output (concat premarker marker))
789 ;; Set the accumulator to the remaining text.
790 (oset this :marker-acc rest)
792 (jde-db-set-debug-cursor
793 (concat package class) (concat class ".java") line-no)
795 (let* ((debuggee (oref jdb debuggee))
796 (status (oref debuggee status)))
797 (oset status stopped-p t)))))
799 ;; Handle case where there is no line number info in current class.
800 (if (string-match (oref this noline-regexp) (oref this marker-acc))
801 (let ((premarker (substring
802 (oref this :marker-acc) 0 (match-beginning 0)))
803 (marker (substring (oref this :marker-acc)
804 (match-beginning 0) (match-end 0)))
805 (pc (substring (oref this :marker-acc)
806 (match-beginning 1) (match-end 1)))
807 (rest (substring (oref this :marker-acc) (match-end 0))))
809 (setq output (concat premarker marker))
810 (oset this :marker-acc rest)))
812 ;; Does the remaining text look like it might end with the
813 ;; beginning of another marker? If it does, then keep it in
814 ;; marker-acc until we receive the rest of it. Since we
815 ;; know the full marker regexp above failed, it's pretty simple to
816 ;; test for marker starts.
817 (if (string-match "\\(^Breakpoint hit:\\)\\|\\(^Step completed:\\)"
818 (oref this :marker-acc))
820 ;; Everything before the potential marker start can be output.
821 (setq output (concat output
822 (substring (oref this :marker-acc)
823 0 (match-beginning 0))))
825 ;; Everything after, we save, to combine with later input.
828 (substring (oref this :marker-acc) (match-beginning 0))))
830 (concat output (oref this :marker-acc)))
831 (oset this :marker-acc ""))
833 (jde-jdb-set-breakpoint-listener this output)
837 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
839 ;; jdb Stack Listener ;;
841 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
842 (defclass jde-jdb-stack-listener (jde-db-listener)
843 ((stack-depth :initarg :stack-depth
848 "Listens for changes in the current stack frame.")
851 ;; Thanks to Michael Ernst <mernst@cs.washington.edu> for the following
852 ;; stack-related code.
854 ;; Extract the index of the current stack frame from the jdb prompt, where
855 ;; the prompt is of the form
857 ;; thread[stack_index]
863 ;; The user can move the debugger up and down the stack via the up and
864 ;; down commands. The debugger indicates the current location by the
865 ;; stack index portion of its prompt.
866 (defmethod jde-db-listener-filter-output ((this jde-jdb-stack-listener) output)
867 (let* ((jdb (oref this debugger))
868 (debuggee (oref jdb debuggee)))
869 (if (string-match "^[-a-zA-Z0-9_$ -]+\\[\\([0-9]*,?[0-9]+\\)\\] " output)
870 (oset debuggee :stack-depth (match-string 1 output)))
874 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
876 ;; jdb Application Debuggee ;;
878 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
879 (defclass jde-jdb-debuggee-app (jde-db-debuggee-app) ()
880 "Application process being debugged with jdb.")
882 (defmethod initialize-instance ((this jde-jdb-debuggee-app) &rest fields)
883 "Constructs an instance of a jdb debuggee."
885 (oset this status (jde-db-debuggee-status "jdb status")))
887 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
889 ;; jdb Applet Debuggee ;;
891 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
892 (defclass jde-jdb-debuggee-applet (jde-db-debuggee-applet) ()
893 "Application process being debugged with jdb.")
895 (defmethod initialize-instance ((this jde-jdb-debuggee-applet) &rest fields)
896 "Constructs an instance of a jdb debuggee."
898 (oset this status (jde-db-debuggee-status "jdb status")))
901 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
903 ;; Class of JDE Debuggers based on jdb. ;;
905 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
906 (defclass jde-db-jdb (jde-db-debugger)
907 ((exec-name :initarg :exec-name
911 "Name of the jdb executable.")
916 "Path of the jdb executable.")
917 (bp-listener :initarg :bp-listener
918 :type jde-jdb-breakpoint-listener
919 :documentation "Breakpoint listener."))
920 (:allow-nil-initform t)
921 "Class of generic jdb debuggers")
923 (defmethod initialize-instance ((this jde-db-jdb) &rest fields)
924 "Constructor for generic jdb debugger."
926 (oset this :name "jdb")
928 ;; Install jdb versions of debugger commands.
929 (oset this cmd-set (jde-jdb-cmd-set "jdb commands" :debugger this))
931 (oset this bp-listener
932 (jde-jdb-breakpoint-listener
933 "jdb breakpoint listener"
936 (jde-db-add-listener this (oref this bp-listener))
940 (jde-jdb-stack-listener
944 (defmethod jde-db-create-debuggee-app ((this jde-db-jdb) main-class)
947 :debuggee (jde-jdb-debuggee-app
948 (concat "Application: " main-class)
949 :main-class main-class)))
951 (defmethod jde-db-create-debuggee-applet ((this jde-db-jdb) applet-doc)
954 :debuggee (jde-jdb-debuggee-applet
955 (concat "Applet: " applet-doc)
958 (defmethod jde-db-jdb-start ((this jde-db-jdb) prog-args cmdstr)
959 "Start the debugger."
960 (let ((w32-quote-process-args ?\")
961 (win32-quote-process-args ?\") ;; XEmacs
962 (source-directory default-directory)
964 (jde-db-debugger-get-working-dir this)))
966 (oset this :buffer (get-buffer-create (oref this :buffer-name)))
969 (set-buffer (oref this :buffer))
970 ;; Do not erase the last transcript; user may wish to view it.
972 (goto-char (point-max))
973 (cd working-directory)
974 (insert (concat "cd " working-directory "\n"))
977 (make-local-variable 'comint-prompt-regexp)
978 (setq comint-prompt-regexp "\\(^> *\\)\\|\\(^.*\\[[0-9]+\\] *\\)")
979 (make-local-variable 'paragraph-start)
980 (setq paragraph-start comint-prompt-regexp)
982 (let ((process-connection-type nil))
983 (comint-exec (oref this :buffer)
984 (oref this :buffer-name)
990 (get-buffer-process (oref this buffer)))
992 (cd source-directory)
994 (jde-db-set-process-filter this)
995 (jde-db-set-process-sentinel this)
996 (run-hooks 'jde-jdb-mode-hook)
997 (pop-to-buffer (oref this buffer))
999 (oset-default 'jde-db-debugger the-debugger this)
1000 (oset this running-p t))))
1003 (defmethod jde-jdb-connect ((this jde-db-jdb))
1004 "Connect the debugger to an existing process."
1006 (not (slot-boundp this 'buffer))
1007 (not (oref this :buffer))
1008 (not (comint-check-proc (oref this :buffer))))
1009 (let* ((debuggee (oref this debuggee))
1010 (source-directory default-directory)
1011 (connector (oref debuggee connector))
1013 (jde-db-debugger-get-working-dir this))
1015 (if (typep connector 'jde-db-listen-connector)
1016 (if (typep connector 'jde-db-socket-connector)
1020 "com.sun.jdi.SocketListen:port=%s"
1021 (oref connector port)))
1022 (if (typep connector 'jde-db-shared-memory-connector)
1026 "com.sun.jdi.SharedMemoryListen:name=%s"
1027 (oref connector name)))
1028 (error "Invalid connector type.")))
1029 (if (typep connector 'jde-db-attach-connector)
1030 (if (typep connector 'jde-db-socket-connector)
1031 (let ((host (oref connector host))
1032 (port (oref connector port)))
1037 "com.sun.jdi.SocketAttach:hostname=%s,port=%s"
1042 "com.sun.jdi.SocketAttach:port=%s"
1044 (if (typep connector 'jde-db-shared-memory-connector)
1048 "com.sun.jdi.SharedMemoryAttach:name=%s"
1049 (oref connector name)))
1050 (error "Invalid connector type."))))))
1054 (mapconcat (lambda (x) x) prog-args " "))))
1059 (if (typep connector 'jde-db-shared-memory-connector)
1060 (format "*debug %s* debugee-shmem-name" (oref connector name))
1063 (if (or (typep connector 'jde-db-listen-connector)
1064 (not (oref connector port)))
1065 "localhost" (oref connector host))
1066 (oref connector port))))
1068 (oset this :buffer (get-buffer-create (oref this :buffer-name)))
1070 ;; Forward to the debugger any breakpoint requests made
1071 ;; by the user before launching the application.
1072 (if jde-db-breakpoints
1073 (let ((bp-cmd (oref (oref this cmd-set) set-bp)))
1077 (mapcar (lambda (assoc-x) (cdr assoc-x)) jde-db-breakpoints))
1080 (append (oref this next-cmd) (list bp-cmd)))))
1082 (jde-db-jdb-start this prog-args command-string)
1084 (let* ((debuggee (oref this debuggee))
1085 (debuggee-status (oref debuggee status)))
1086 (oset debuggee-status running-p t)
1087 (oset debuggee-status stopped-p t)))
1089 (message "An instance of %s is running." (oref this :buffer-name))
1090 (pop-to-buffer (oref this :buffer-name)))))
1093 (defmethod jde-db-notify-process-exit ((this jde-db-jdb) msg)
1094 "The default debugger process sentinel invokes this method
1095 when the jdb process terminates."
1097 (let* ((debuggee (oref this debuggee))
1098 (debuggee-status (oref debuggee status)))
1099 (oset this running-p nil)
1100 (oset debuggee-status running-p nil)
1101 (oset debuggee-status stopped-p nil)
1102 (jde-db-set-all-breakpoints-specified)))
1104 (defmethod jde-db-launch-arg ((this jde-db-jdb))
1105 "Generate the -launch option for jdb."
1109 (defmethod jde-db-debugger-get-prog-args ((this jde-db-jdb))
1111 ((typep (oref this debuggee) 'jde-db-debuggee-app)
1113 (jde-db-get-vm-args this)
1114 (jde-db-get-vm-args-from-user)
1115 (list (oref (oref this debuggee) main-class))
1116 jde-db-option-application-args
1117 (jde-db-get-app-args-from-user)))
1118 ((typep (oref this debuggee) 'jde-db-debuggee-applet)
1120 (oref (oref this debuggee) doc)))
1122 (error "Unrecognized jdb debuggee type."))))
1127 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1129 ;; JDK 1.1.x Support ;;
1131 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1133 (defclass jde-db-jdb-1-1 (jde-db-jdb)
1135 (:allow-nil-initform t)
1136 "Class of jdb shipped with JDK 1.1.x.")
1139 (defmethod initialize-instance ((this jde-db-jdb-1-1) &rest fields)
1140 "Constructor for jdb-1.1."
1142 (oset (oref this bp-listener)
1144 "^Breakpoint hit: .*(\\([^\$]*\\).*:\\([0-9]*\\))")
1145 (oset (oref this bp-listener) :class-index 1)
1146 (oset (oref this bp-listener) :line-index 2))
1148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1150 ;; JDK 1.3.1 Support ;;
1152 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1153 (defclass jde-db-old-jdb (jde-db-jdb-1-1)
1155 (:allow-nil-initform t)
1156 "Class of pre-JPDA jdb shipped with post-JPDA versions of the
1159 (defmethod initialize-instance ((this jde-db-old-jdb) &rest fields)
1160 "Constructor for old jdb."
1163 (oset this :exec-name "oldjdb"))
1166 (defclass jde-db-jdb-1-3 (jde-db-jdb)
1168 (:allow-nil-initform t)
1169 "Class of JPDA-based jdb shipped with JDK 1.3.")
1172 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1174 ;; JDK 1.4.0 Support ;;
1176 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1177 (defclass jde-db-jdb-1-4 (jde-db-jdb)
1179 (:allow-nil-initform t)
1180 "Class of JPDA-based jdb shipped with J2SDK 1.4")
1182 (defmethod initialize-instance ((this jde-db-jdb-1-4) &rest fields)
1183 "Constructor for jdb-1.4."
1185 ;; Regular expression used to find a jdb breakpoint position marker.
1186 ;; The regular expression has two subexpressions. The first matches
1187 ;; the name of the class in which the breakpoint occurs; the second, the
1188 ;; line number at which the breakpoint occurs."
1189 (oset (oref this bp-listener)
1191 "^.*: \"thread=.*\", \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9,.]*\\)"))
1193 (defun jde-jdb-get-jdb ()
1194 "Gets the version of jdb specified for the
1198 ((string= (car jde-debugger) "jdb")
1200 ((and (< (jde-java-major-version) 2)
1201 (< (jde-java-minor-version) 2))
1202 (setq jdb (jde-db-jdb-1-1 "jdb 1.1")))
1203 ((and (< (jde-java-major-version) 2)
1204 (= (jde-java-minor-version) 3))
1205 (setq jdb (jde-db-jdb-1-3 "jdb 1.3")))
1207 (setq jdb (jde-db-jdb-1-4 "jdb 1.4")))))
1208 ((string= (car jde-debugger) "old jdb")
1209 (if (and (< (jde-java-major-version) 2)
1210 (< (jde-java-minor-version) 2))
1211 (setq jdb (jde-db-jdb-1-1 "jdb 1.1"))
1212 (setq jdb (jde-db-old-jdb "old jdb"))))
1214 (error "%s is not a valid jdb debugger choice."
1215 (car jde-debugger))))
1218 :path (jde-get-jdk-prog (oref jdb :exec-name)))
1221 (defun jde-jdb-get-socket-address ()
1222 (if jde-db-option-connect-socket
1223 jde-db-option-connect-socket
1225 (read-from-minibuffer "Debuggee host: " "local"))
1227 (read-from-minibuffer "Debuggee port: " "4444")))
1229 (if (not (string= host "local"))
1235 (defun jde-jdb-attach-via-socket ()
1236 "Launch jdb in attach mode. In this mode, jdb connects itself to an
1237 existing debuggee process via a socket. The debuggee process itself must have been
1238 launched in debugger server mode. The JDK vm accepts command line
1239 arguments that starts the vm in the appropriate mode, e.g.,
1241 java -Xdebug -Xrunjdwp:transport=dt_socket,address=4444,server=y,suspend=n MyClass
1243 starts MyClass in debugger server mode at the socket address
1244 4444. See jdb in the tools section of the JDK documentation for
1245 more information on these arguments.
1247 Selecting the Server mode option of the `jde-run-option-debug' customization
1248 variable causes the JDEE to specify the appropriate command-line
1249 arguments when launching the debuggee process.
1251 The attach command connects the debugger to the debuggee at the
1252 address specified by `jde-db-option-connect-socket'. If this variable
1253 is nil, this command prompts you to enter the address."
1255 (let* ((socket (jde-jdb-get-socket-address))
1256 (host (nth 0 socket))
1257 (port (nth 1 socket)))
1258 (if (string= port "")
1259 (error "You must specify the port of the debuggee process.")
1260 (let* ((debugger (jde-jdb-get-jdb))
1262 (jde-db-socket-attach-connector
1267 (jde-jdb-debuggee-app
1270 "Attached to socket %s:%s"
1271 (if host host "localhost")
1273 :connector connector)))
1274 (oset debugger the-debugger debugger)
1275 (oset debugger :debuggee debuggee)
1276 (jde-jdb-connect debugger)))))
1279 (defun jde-jdb-get-shared-memory-name ()
1280 (if jde-db-option-connect-shared-memory-name
1281 jde-db-option-connect-shared-memory-name
1282 (read-from-minibuffer "Shared memory name: " "javadebug")))
1285 (defun jde-jdb-attach-via-shared-memory ()
1286 "Launch jdb in attach mode. In this mode, jdb connects itself to an
1287 existing debuggee process. This command specifies use of shared memory
1288 as the connection transport. The debuggee process itself must have
1289 been launched in debugger server mode. The JDK vm accepts command line
1290 arguments that starts the vm in the appropriate mode, e.g.,
1292 java -Xdebug -Xrunjdwp:transport=dt_shmem,address=javadebug,server=y,suspend=n MyClass
1294 starts MyClass in debugger server mode, specifying \"javadebug\" as
1295 the name of the shared memory transport. See jdb in the tools section
1296 of the JDK documentation for more information on these arguments.
1298 Selecting the Server mode option of the `jde-run-option-debug' customization
1299 variable causes the JDEE to specify the appropriate command-line
1300 arguments when launching the debuggee process.
1302 The attach command connects the debugger to the debuggee at the
1303 address specified by `jde-db-option-connect-shared-memory', or, if
1304 this variable is nil, this command prompts you to enter a name."
1307 (eq system-type 'windows-nt)
1308 "The debugger does not support shared memory connections on this platform.")
1309 (let ((shmem-name (jde-jdb-get-shared-memory-name)))
1310 (if (string= shmem-name "")
1311 (error "Shared memory name required.")
1312 (let* ((debugger (jde-jdb-get-jdb))
1314 (jde-db-shared-memory-attach-connector
1318 (jde-jdb-debuggee-app
1321 "Attached via shared memory: %s."
1323 :connector connector)))
1324 (oset debugger the-debugger debugger)
1325 (oset debugger :debuggee debuggee)
1326 (jde-jdb-connect debugger)))))
1329 (defun jde-jdb-get-socket-listen-port ()
1330 (if jde-db-option-connect-socket
1331 (nth 1 jde-db-option-connect-socket)
1332 (read-from-minibuffer "Listen port: " "4444")))
1334 (defun jde-jdb-listen-via-socket ()
1335 "Launch jdb in listen mode. In this mode, jdb launches itself and
1336 connects itself to a subsequently launched debuggee process. This
1337 command uses a socket as the method for connecting to the debuggee
1338 process. The debuggee process itself must be launched in debugger
1339 client mode The JDK vm accepts command line arguments that starts the
1340 vm in the appropriate mode, e.g.,
1342 java -Xdebug -Xrunjdwp:transport=dt_socket,address=4444,server=n,suspend=n MyClass
1344 starts MyClass in debugger client mode at the socket port 4444. See jdb in
1345 the tools section of the JDK documentation for
1348 Selecting the Client mode option of the `jde-run-option-debug' customization
1349 variable causes the JDEE to specify the appropriate command-line
1350 arguments when launching the debuggee process.
1352 The listen command listens for the debugger at the
1353 address specified by `jde-db-option-connect-socket'. If this variable
1354 is nil, this command prompts you to enter the address. You can enter
1355 either the address that you plan to start the debuggee process at
1356 (e.g., jdbconn) or a null string. If you enter a null string, this
1357 command startes the debugger in a mode that accepts connections from
1358 any debuggee process started in debugger client mode, regardless of
1361 (let* ((debugger (jde-jdb-get-jdb))
1362 (port (jde-jdb-get-socket-listen-port))
1364 (jde-db-socket-listen-connector
1368 (jde-jdb-debuggee-app
1370 :main-class (concat "Listening at port " port)
1371 :connector connector)))
1372 (oset debugger the-debugger debugger)
1373 (oset debugger :debuggee debuggee)
1374 (jde-jdb-connect debugger)))
1376 (defun jde-jdb-listen-via-shared-memory ()
1377 "Launch jdb in listen mode. In this mode, a subsequently
1378 launched debuggee process connects itself to jdb. This command uses
1379 Windows shared memory primitives as the method of communications
1380 between jdb andthe debuggee process. The debuggee process itself must
1381 be launched in debugger client mode. The JDK vm accepts command line
1382 arguments that starts the vm in the appropriate mode, e.g.,
1385 -Xrunjdwp:transport=dt_shmem,address=javadebug,server=n,suspend=n
1388 starts MyClass in debugger client mode at the shared memory address
1389 javadebug. See jdb in the tools section of the JDK documentation for
1392 Selecting the Client mode option of the `jde-run-option-debug' customization
1393 variable causes the JDEE to specify the appropriate command-line
1394 arguments when launching the debuggee process.
1396 The listen command listens for the debugger at the
1397 address specified by `jde-db-option-connect-shared-memory'. If this variable
1398 is nil, this command prompts you to enter the address that you plan to start
1399 the debuggee process at (e.g., jdbconn)."
1402 (eq system-type 'windows-nt)
1403 "The debugger does not support shared memory connections on this platform.")
1404 (let* ((debugger (jde-jdb-get-jdb))
1405 (name (jde-jdb-get-shared-memory-name))
1407 (jde-db-shared-memory-listen-connector
1411 (jde-jdb-debuggee-app
1413 :main-class (concat "Listening to " name)
1414 :connector connector)))
1415 (oset debugger the-debugger debugger)
1416 (oset debugger :debuggee debuggee)
1417 (jde-jdb-connect debugger)))
1419 (defun jde-jdb-display (key)
1420 "Print expression at point."
1421 (interactive "sExpression: ")
1422 (jde-assert-source-or-debug-buffer)
1423 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1424 (debuggee (oref debugger debuggee))
1425 (debuggee-status (oref debuggee status)))
1426 (if (and (oref debugger running-p)
1427 (oref debuggee-status stopped-p))
1428 (let* ((cmd-set (oref debugger cmd-set))
1430 (if (string= "print" key)
1431 (setq cmd (oref cmd-set print))
1432 (if (string= "dump" key)
1433 (setq cmd (oref cmd-set dump))
1434 (if (string= "eval" key)
1435 (setq cmd (oref cmd-set eval))
1436 (if (string= "set" key)
1437 (setq cmd (oref cmd-set set-var))
1438 (if (string= "locals" key)
1439 (setq cmd (oref cmd-set locals)))))))
1440 (jde-db-exec-cmd debugger cmd))
1441 (let ((class (oref debuggee main-class)))
1442 (error "Application %s is not stopped" class)))))
1444 (defun jde-jdb-print ()
1446 (jde-jdb-display "print"))
1448 (defun jde-jdb-dump ()
1450 (jde-jdb-display "dump"))
1452 (defun jde-jdb-eval ()
1454 (jde-jdb-display "eval"))
1456 (defun jde-jdb-locals ()
1458 (jde-jdb-display "locals"))
1460 (defun jde-jdb-set ()
1462 (jde-jdb-display "set"))
1464 (defun jde-jdb-help ()
1466 (let* ((jde-dir (jde-find-jde-doc-directory))
1469 (expand-file-name "doc/html/jdb-ug/jdb-ug-frame.html" jde-dir))))
1472 (file-exists-p jdb-ug-path))
1473 (browse-url (concat "file://" (jde-convert-cygwin-path jdb-ug-path))
1474 (if (boundp 'browse-url-new-window-flag)
1475 'browse-url-new-window-flag
1476 browse-url-new-window-p))
1477 (signal 'error '("Cannot find jdb user guide.")))))
1480 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1482 ;; Debug Commands ;;
1484 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1487 (defvar jde-jdb-emacs-menu-spec
1492 :active (jde-db-debuggee-stopped-p)
1493 :help "Step over the next method."]
1498 :active (jde-db-debuggee-stopped-p)
1499 :help "Step into the next method."]
1503 :active (jde-db-debuggee-stopped-p)
1504 :help "Step out of the current method."]
1509 (slot-boundp 'jde-db-debugger 'the-debugger)
1510 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1511 (debuggee (oref debugger debuggee))
1512 (debuggee-status (oref debuggee status)))
1513 (and (oref debugger running-p)
1514 (not (oref debuggee-status running-p)))))
1517 (not (slot-boundp 'jde-db-debugger 'the-debugger))
1518 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1519 (debuggee (oref debugger debuggee))
1520 (debuggee-status (oref debuggee status)))
1521 (or (not (oref debugger running-p))
1522 (not (oref debuggee-status running-p)))))
1523 :help "Start the current program."]
1528 (jde-db-debuggee-stopped-p)
1529 (jde-db-debuggee-suspended-p))
1531 :included (jde-db-debuggee-running-p)
1532 :help "Continue the current program."]
1536 :active (jde-db-debuggee-running-p)
1537 :help "Terminate the current debugging session."]
1541 ["Toggle Breakpoint"
1542 jde-debug-toggle-breakpoint
1544 :help "Set (or remove) a breakpoint at the current line."]
1546 ["Clear Breakpoints"
1547 jde-debug-clear-breakpoints
1548 :active jde-db-breakpoints
1549 :help "Remove all breakpoints."]
1552 jde-debug-list-breakpoints
1553 :active jde-db-breakpoints
1554 :help "Display a list of breakpoints."]
1563 :active (jde-db-debuggee-stopped-p)
1564 :help "Evaluate an expression and display the results."]
1568 :active (jde-db-debuggee-stopped-p)
1569 :help "Display the fields of an object referenced by a variable."]
1574 :active (jde-db-debuggee-stopped-p)
1575 :help "Display the variables in scope at the current line."]
1580 :active (jde-db-debuggee-stopped-p)
1581 :help "Change the value of an in-scope variable."]
1588 :active (jde-db-debuggee-stopped-p)
1589 :help "Move the debug cursor up the method call stack."]
1594 (jde-db-debuggee-stopped-p)
1595 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1596 (debuggee (oref debugger debuggee)))
1597 (> (jde-jdb-string-to-int
1598 (oref debuggee :stack-depth)) 1)))
1599 :help "Move the debug cursor down the method call stack." ]
1603 :active (jde-db-debuggee-stopped-p)
1604 :help "Display the call stack."]
1610 ["Attach Via Socket"
1611 jde-jdb-attach-via-socket
1612 :active (not (jde-db-debuggee-running-p))
1613 :help "Attach the debugger to an external process via a socket."]
1614 ["Attach Via Shared Memory"
1615 jde-jdb-attach-via-shared-memory
1617 (eq system-type 'windows-nt)
1618 (not (jde-db-debuggee-running-p)))
1619 :help "Attach the debugger to an external process via a shared memory connection."]
1620 ["Listen Via Socket"
1621 jde-jdb-listen-via-socket
1622 :active (not (jde-db-debuggee-running-p))
1623 :help "Listen at a socket for an external process."]
1624 ["Listen Via Shared Memory"
1625 jde-jdb-listen-via-shared-memory
1627 (eq system-type 'windows-nt)
1628 (not (jde-db-debuggee-running-p)))
1629 :help "Listen in shared memory for an external process."]
1634 jde-bug-show-preferences
1636 :help "Not yet implemented."]
1642 :help "Display the JDEE's jdb user's guide in an HTML browser."]
1644 "Defines the Jdb menu for Emacs.")
1646 (defvar jde-jdb-xemacs-menu-spec
1651 :active (jde-db-debuggee-stopped-p)]
1656 :active (jde-db-debuggee-stopped-p)
1661 :active (jde-db-debuggee-stopped-p)]
1666 (slot-boundp 'jde-db-debugger 'the-debugger)
1667 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1668 (debuggee (oref debugger debuggee))
1669 (debuggee-status (oref debuggee status)))
1670 (and (oref debugger running-p)
1671 (not (oref debuggee-status running-p)))))
1674 (not (slot-boundp 'jde-db-debugger 'the-debugger))
1675 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1676 (debuggee (oref debugger debuggee))
1677 (debuggee-status (oref debuggee status)))
1678 (or (not (oref debugger running-p))
1679 (not (oref debuggee-status running-p)))))]
1684 (jde-db-debuggee-stopped-p)
1685 (jde-db-debuggee-suspended-p))
1687 :included (jde-db-debuggee-running-p)]
1691 :active (jde-db-debuggee-running-p)]
1695 ["Toggle Breakpoint"
1696 jde-debug-toggle-breakpoint
1699 ["Clear Breakpoints"
1700 jde-debug-clear-breakpoints
1704 jde-debug-list-breakpoints
1713 :active (jde-db-debuggee-stopped-p)]
1717 :active (jde-db-debuggee-stopped-p)]
1722 :active (jde-db-debuggee-stopped-p)]
1727 :active (jde-db-debuggee-stopped-p)]
1734 :active (jde-db-debuggee-stopped-p)]
1739 (jde-db-debuggee-stopped-p)
1740 (let* ((debugger (oref 'jde-db-debugger the-debugger))
1741 (debuggee (oref debugger debuggee)))
1742 (> (jde-jdb-string-to-int
1743 (oref debuggee :stack-depth)) 1)))]
1747 :active (jde-db-debuggee-stopped-p)]
1753 ["Attach Via Socket"
1754 jde-jdb-attach-via-socket
1755 :active (not (jde-db-debuggee-running-p))]
1756 ["Attach Via Shared Memory"
1757 jde-jdb-attach-via-shared-memory
1759 (eq system-type 'windows-nt)
1760 (not (jde-db-debuggee-running-p)))]
1761 ["Listen Via Socket"
1762 jde-jdb-listen-via-socket
1763 :active (not (jde-db-debuggee-running-p))]
1764 ["Listen Via Shared Memory"
1765 jde-jdb-listen-via-shared-memory
1767 (eq system-type 'windows-nt)
1768 (not (jde-db-debuggee-running-p)))]
1773 jde-bug-show-preferences nil]
1778 "Defines the JDE's menu of jdb commands.")
1781 (defvar jde-jdb-mode-map
1782 (let ((km (make-sparse-keymap)))
1783 (easy-menu-define jde-jdb-menu km "Jdb Minor Mode Menu"
1784 jde-jdb-emacs-menu-spec)
1786 "Keymap for Jdb minor mode.")
1788 (defvar jde-jdb-minor-mode nil
1789 "Non-nil if jdb minor mode is enabled.")
1790 (make-variable-buffer-local 'jde-jdb-minor-mode)
1792 (defun jde-jdb-minor-mode (&optional arg)
1793 "Toggle jdb minor mode.
1794 With prefix argument ARG, turn on if positive, otherwise off..
1796 \\{jde-jdb-mode-map}"
1798 (list (or current-prefix-arg
1799 (if jde-jdb-minor-mode 0 1))))
1801 (setq jde-jdb-minor-mode
1804 (prefix-numeric-value arg)
1806 (not jde-jdb-minor-mode)))
1808 (if jde-jdb-minor-mode
1809 (if (featurep 'xemacs)
1810 (easy-menu-add jde-jdb-xemacs-menu-spec jde-jdb-mode-map))
1811 (if (featurep 'xemacs)
1812 (easy-menu-remove jde-jdb-xemacs-menu-spec))))
1814 (semantic-add-minor-mode 'jde-jdb-minor-mode " jdb" jde-jdb-mode-map)
1817 ;; (fmakunbound 'jde-jdb-key-bindings)
1818 (defcustom jde-jdb-key-bindings
1819 (list (cons "[?\C-c ?\C-a ?\C-s]" 'jde-debug-step-over)
1820 (cons "[?\C-c ?\C-a ?\C-n]" 'jde-debug-step-into)
1821 (cons "[?\C-c ?\C-a ?\C-o]" 'jde-debug-step-out)
1822 (cons "[?\C-c ?\C-a ?\C-c]" 'jde-debug-cont)
1823 (cons "[?\C-c ?\C-a ?\C-r]" 'jde-debug-run)
1824 (cons "[?\C-c ?\C-a ?\C-b]" 'jde-debug-toggle-breakpoint)
1825 (cons "[?\C-c ?\C-a ?\C-u]" 'jde-debug-up)
1826 (cons "[?\C-c ?\C-a ?\C-d]" 'jde-debug-down)
1827 (cons "[?\C-c ?\C-a ?\C-p]" 'jde-jdb-print)
1828 (cons "[?\C-c ?\C-a ?\C-d]" 'jde-jdb-dump)
1829 (cons "[?\C-c ?\C-a ?\C-e]" 'jde-jdb-eval)
1830 (cons "[?\C-c ?\C-a ?\C-v]" 'jde-jdb-set)
1831 (cons "[?\C-c ?\C-a ?\C-l]" 'jde-jdb-locals))
1832 "*Specifies key bindings for jdb debug commands.
1833 The value of this variable is an association list. The car of
1834 each element specifies a key sequence. The cdr specifies
1835 an interactive command that the key sequence executes. To enter
1836 a key with a modifier, type C-q followed by the desired modified
1837 keystroke. For example, to enter C-s (Control s) as the key to be
1838 bound, type C-q C-s in the key field in the customization buffer.
1839 You can use the notation [f1], [f2], etc., to specify function keys."
1842 (cons :tag "Key binding"
1844 (function :tag "Command")))
1845 :set '(lambda (sym val)
1846 ;; Unmap existing key bindings
1848 (boundp 'jde-jdb-key-bindings)
1849 jde-jdb-key-bindings)
1852 (let ((key (car binding))
1853 (fcn (cdr binding)))
1854 (if (string-match "\\[.+]" key)
1855 (setq key (car (read-from-string key))))
1856 (define-key jde-jdb-mode-map key nil)))
1857 jde-jdb-key-bindings))
1858 ;; Map new key bindings.
1861 (let ((key (car binding))
1862 (fcn (cdr binding)))
1863 (if (string-match "\\[.+]" key)
1864 (setq key (car (read-from-string key))))
1865 (define-key jde-jdb-mode-map key fcn)))
1867 (set-default sym val)))
1869 (defun jde-jdb-string-to-int(number)
1870 "This method removes punctuation from a string, e.g, 1,200 (1.200 in Danish),
1871 and converts the result to an integer."
1872 (if (string-match "[^[:digit:]]" number)
1873 (setq number (replace-match "" nil nil number)))
1874 (string-to-int number))
1879 ;; $Log: jde-jdb.el,v $
1880 ;; Revision 1.48 2005/01/18 05:23:30 paulk
1881 ;; Change variables named assoc to assoc-x. This is intended to fix a "Symbol's value as variable is void: old-assoc" problem when debugging with the compiled version of JDE in xemacs/cygwin. Thanks to Henry S. Thompson.
1883 ;; Revision 1.47 2004/12/17 05:22:25 paulk
1884 ;; Fix regression that caused DOS window to appear when running the debugger.
1886 ;; Revision 1.46 2004/12/08 12:49:18 paulk
1887 ;; Updated regular expressions to accommodate non-English punctuation styles for numeric
1888 ;; expressions in jdb messages, e.g., 1.200 for the English 1,200. Thanks to Morten B. Isaksen.
1890 ;; Revision 1.45 2004/10/18 03:37:34 paulk
1891 ;; Wrap call to comint-exec in save-w32-show-window macro.
1893 ;; Revision 1.44 2004/10/03 03:33:12 paulk
1894 ;; Fix regression caused by renaming jde-jdb-debuggee as jde-jdb-debuggee-app.
1896 ;; Revision 1.43 2004/09/20 05:29:34 paulk
1897 ;; Changes needed to make restructured debugging code work for applets.
1899 ;; Revision 1.42 2004/09/02 04:49:01 paulk
1900 ;; More infrastructure work to support debugging of applets.
1902 ;; Revision 1.41 2004/09/01 06:21:29 paulk
1903 ;; Restructured to accommodate debugging applets.
1905 ;; Revision 1.40 2004/06/22 01:56:44 jslopez
1906 ;; Removes extra point from the class being passed to jde-db-set-debug-cursor.
1907 ;; It has an extra dot i.e. com.company..MyClass.
1909 ;; Revision 1.39 2004/05/12 02:43:40 jslopez
1910 ;; Adds safety check to set the stack depth to 1 if it is not set. This can
1911 ;; happens if the regexpression fails, i.e A thread name with a character not in
1912 ;; the regexpression. Enhances the regexpression to parse the line number to allow
1913 ;; number larger than 999. Enhances the regexpression that parser the where
1914 ;; command to allow spaces and '-' since those are valid thread names. In
1915 ;; additions, adds support for line number larger than 999. Fixes unbound variable
1916 ;; "port" in jde-jdb-connect method.
1918 ;; Revision 1.38 2004/02/18 13:48:21 jslopez
1919 ;; When a breakpoint was requested on a line that does not contain code and jdb
1920 ;; responded with "Unable to set breakpoint" it was being handle as a set
1921 ;; breakpoint,i.e. the breakpoint was being activated. Modifies
1922 ;; jde-jdb-set-breakpoint-listener to ignore this message. Modifies
1923 ;; jde-db-cmd-notify-response to delete the breakpoint in this situation. In
1924 ;; addition, adds a check for a null bp, in some instances it was null causing an
1927 ;; Revision 1.37 2003/09/18 05:30:41 paulk
1928 ;; Replace the attach and listen commands with separate commands for
1929 ;; attaching/listening via sockets and shared memory. This is necessary to support attaching via sockets on Windows platforms.
1931 ;; Revision 1.36 2003/06/30 03:58:11 paulk
1932 ;; Provided help strings for Jdb menu items.
1934 ;; Revision 1.35 2003/06/15 04:35:29 paulk
1935 ;; Fix docstrings for jde-jdb-attach and jde-jdb-listen.
1937 ;; Revision 1.34 2003/06/12 04:06:19 paulk
1938 ;; Cosmetic fix to set-var command.
1940 ;; Revision 1.33 2003/06/02 05:08:51 paulk
1941 ;; Reorganized Jdb->Display menu. Changed names of commands to reflect purpose, e.g., Display->Print
1942 ;; becomes Display->Expression. Deleted Display-Eval because it is the same as Display->Expression.
1943 ;; Moved Set (variable) command from the DIsplay submenu to the toplevel Jdb menu. Changed
1944 ;; first Jdb->Set Variable prompt from "Expression: " to Variable: ".
1946 ;; Revision 1.32 2003/05/27 04:05:15 paulk
1947 ;; Adds jde-jdb-help command. This command displays the JDB user's guide.
1949 ;; Revision 1.31 2003/05/14 11:09:30 paulk
1950 ;; Fix regression caused by renaming jdb classes.
1952 ;; Revision 1.30 2003/05/14 06:38:48 paulk
1953 ;; Fix jde-jdb-attach and jde-jdb-listen to reflect replacement of
1954 ;; jde-db-option-connect-address with jde-db-option-listen-address and
1955 ;; jde-db-option-attach-address.
1957 ;; Revision 1.29 2003/05/13 05:06:04 paulk
1958 ;; The attach and listen commands now prompt for a connect address if jde-db-connect-address
1959 ;; is nil. Also provided extensive doc strings for these commands.
1961 ;; Revision 1.28 2003/02/25 17:19:59 jslopez
1962 ;; Fixes bug setting breakpoints that will leave breakpoints mark as
1963 ;; deferred even though they are not.
1965 ;; Revision 1.27 2003/02/25 17:09:11 jslopez
1966 ;; Fixes regression bug. Updates the remaining jde-db-debuggee to jde-jdb-debuggee.
1968 ;; Revision 1.26 2003/02/25 06:53:29 paulk
1969 ;; Created a generalized jde-debug command and wired it up to jdb.
1970 ;; Next step is to wire it up to JDEbug.
1972 ;; Revision 1.25 2003/02/25 04:37:15 jslopez
1973 ;; Sets a main-class when attaching or listening through jdb to avoid
1974 ;; an unbound error.
1976 ;; Revision 1.24 2003/02/24 18:03:28 jslopez
1977 ;; Fixes bug in jde-db-listener-filter-output.
1979 ;; Revision 1.23 2003/01/12 19:17:17 jslopez
1980 ;; Adds command List Breakpoints to the JDB menu.
1982 ;; Revision 1.22 2003/01/09 12:10:13 jslopez
1983 ;; Exposes the jdb methods: print, dump, eval, set, and locals.
1985 ;; Revision 1.21 2003/01/08 21:49:13 jslopez
1986 ;; Fixes typo in menu.
1988 ;; Revision 1.20 2003/01/07 00:05:32 jslopez
1989 ;; Fixes bug that would parse line number higher than 999.
1990 ;; JDB prints out the number as 1,999.
1992 ;; Revision 1.19 2002/11/11 05:24:26 paulk
1993 ;; No need to add .exe to jdb path thanks to Mac compatibility fix.
1995 ;; Revision 1.18 2002/11/05 07:56:20 paulk
1996 ;; Mac OS X (darwin) compatibility fix: find paths of jdb and appletviewer on the Mac. Thanks to Andrew Hyatt.
1998 ;; Revision 1.17 2002/10/16 04:59:57 paulk
1999 ;; Debug cursor now works in files that do not belong to a package. Thanks to Andy Piper.
2001 ;; Revision 1.16 2002/06/17 07:24:08 paulk
2002 ;; Updated the JDEE's applet debugging command to
2003 ;; work with its new jdb interface.
2005 ;; Revision 1.15 2002/05/21 06:35:20 paulk
2006 ;; Updated to support J2SDK 1.4.0 version of jdb.
2008 ;; Revision 1.14 2002/03/06 13:00:18 paulk
2009 ;; * Removed references to obsolete jde-db-option-attach variable.
2010 ;; * The jdb launch, attach, and listen commands now update the
2011 ;; the-debugger field in the jde-db-debugger class.
2013 ;; Revision 1.13 2002/03/04 06:43:41 paulk
2014 ;; Adds support for connecting debugger to an independently started
2015 ;; process, using either attach or listen mode.
2017 ;; Revision 1.12 2002/02/08 12:04:00 paulk
2018 ;; Completed implementation of step-into and step-out commands.
2020 ;; Revision 1.11 2002/02/04 05:47:17 paulk
2021 ;; Added code to rehighlight breakpoints if the user kills a
2022 ;; buffer for a source file that contains breakpoints and
2023 ;; then reopens the file.
2025 ;; Revision 1.10 2002/01/15 13:34:24 paulk
2026 ;; Adds a Clear Breakpoints command for jdb.
2028 ;; Revision 1.9 2002/01/14 13:33:57 paulk
2029 ;; - Now defines three breakpoint marker colors: green for a specified breakpoint,
2030 ;; yellow for a requested breakpoint, and red for an enabled breakpoint.
2032 ;; - The debug application command now requests all specified
2033 ;; breakpoints at the beginning of a debug session.
2035 ;; - The debug application command now changes the color of all breakpoints
2036 ;; to green (specified) at the end of a debug session.
2038 ;; Revision 1.8 2002/01/11 05:45:23 paulk
2039 ;; - Use overlays/extents to record location of breakpoints in a buffer.
2040 ;; - Use different colors to indicate requested and enabled breakpoints.
2042 ;; Revision 1.7 2002/01/02 05:34:31 paulk
2043 ;; * Fixed some bugs in jdb stack navigation commands.
2044 ;; * Moved the where command out processing from the jdb stack listener
2045 ;; to the whre cmd response method where it belongs.
2046 ;; * Added key bindings for jdb commands.* Fixed some bugs in jdb stack navigation commands.
2048 ;; Revision 1.6 2001/12/31 07:54:39 paulk
2049 ;; Implemented jdb versions of generalized
2050 ;; quit, step-over, step-into, stack up, stack down,
2051 ;; and stack where commands.
2053 ;; Revision 1.5 2001/12/28 05:35:45 paulk
2054 ;; * Implemented jdb versions of generalized stop and continue process commands.
2056 ;; * Implemented breakpoint and stack message listeners.
2058 ;; Revision 1.4 2001/12/17 08:07:47 paulk
2059 ;; jdb implementation of generalized clear breakpoint command.
2061 ;; Revision 1.3 2001/12/10 04:29:54 paulk
2062 ;; Created generalized breakpoint framework. Provided initial
2063 ;; implementation for jdb. A lot of work remains.
2065 ;; Revision 1.2 2001/12/04 06:05:36 paulk
2066 ;; Removed carriage returns.
2068 ;; Revision 1.1 2001/12/04 05:25:40 paulk
2069 ;; Initial revision.
2072 ;;; end of jde-jdb.el