diff options
author | Jim Blandy <jimb@redhat.com> | 1993-02-22 14:15:34 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-02-22 14:15:34 +0000 |
commit | 194724a7fe36aefa36245baec995383abb83ecf5 (patch) | |
tree | acda7f45728d97f7c918ba89fb19842d069661b7 /lisp/gud.el | |
parent | 66dbdee3e7ac704a158be14778273e2d32dcf75d (diff) | |
download | emacs-194724a7fe36aefa36245baec995383abb83ecf5.tar.gz |
* gud.el (gud-break): With a prefix argument, set a temporary
breakpoint.
(gud-apply-from-source): New argument ARGS, to pass to FUNC. Now
it's really like `apply'.
(gud-set-break): Add another argument to this method.
Document it in the section describing how the methods are supposed
to be used.
(gud-gdb-set-break): New argument TEMP; if non-nil, set a
temporary breakpoint.
(gud-sdb-set-break, gud-dbx-set-break): New argument TEMP. Ignore
it, since I don't know how to set a temporary breakpoint in these
debuggers.
* gud.el (gud-break): With a prefix argument, set a temporary
breakpoint.
(gud-apply-from-source): New argument ARGS, to pass to FUNC. Now
it's really like `apply'.
(gud-set-break): Add another argument to this method.
Document it in the section describing how the methods are supposed
to be used.
(gud-gdb-set-break): New argument TEMP; if non-nil, set a
temporary breakpoint.
(gud-sdb-set-break, gud-dbx-set-break): New argument TEMP. Ignore
it, since I don't know how to set a temporary breakpoint in these
debuggers.
Diffstat (limited to 'lisp/gud.el')
-rw-r--r-- | lisp/gud.el | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/lisp/gud.el b/lisp/gud.el index d5eaf466601..13e510d8d55 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -65,7 +65,7 @@ This association list has elements of the form (defun gud-visit-file (f) (error "GUD not properly entered.")) -(defun gud-set-break (proc f n) +(defun gud-set-break (proc f n rest) (error "GUD not properly entered.")) ;; This macro is used below to define some basic debugger interface commands. @@ -121,8 +121,12 @@ This association list has elements of the form ;; by the car of gud-tag-frame. This may be a file name, a tag name, or ;; something else. ;; -;; The job of the gud-set-break method is to send the commands necessary -;; to set a breakpoint at a given line in a given source file. +;; The job of the gud-set-break method is to send the commands +;; necessary to set a breakpoint at a given line in a given source +;; file. If its third argument TEMP is non-nil, the breakpoint set +;; should be temporary - it should be deleted when it is reached. If +;; the debugger doesn't support such breakpoints, it should set an +;; ordinary breakpoint. ;; ;; Debugger-specific information begins here: @@ -151,8 +155,8 @@ This association list has elements of the form (defun gud-gdb-visit-file (f) (find-file-noselect f)) -(defun gud-gdb-set-break (proc f n) - (gud-call "break %s:%d" f n)) +(defun gud-gdb-set-break (proc f n temp) + (gud-call "%s %s:%d" (if temp "tbreak" "break") f n)) ;;;###autoload (defun gdb (path) @@ -200,7 +204,10 @@ and source-file directory for your debugger." (defun gud-sdb-visit-file (f) (find-tag-noselect f)) -(defun gud-sdb-set-break (proc f n) +;;; We'll just ignore the TEMP argument for now; I don't know how to +;;; set temporary breakpoints in sdb. (See the description of the +;;; gud-set-break method for details.) +(defun gud-sdb-set-break (proc f n temp) (gud-queue-send (format "e %s" f) (format "%d b" n))) ;;;###autoload @@ -246,7 +253,10 @@ and source-file directory for your debugger." (defun gud-dbx-visit-file (f) (find-file-noselect f)) -(defun gud-dbx-set-break (proc f n) +;;; We'll just ignore the TEMP argument for now; I don't know how to +;;; set temporary breakpoints in dbx. (See the description of the +;;; gud-set-break method for details.) +(defun gud-dbx-set-break (proc f n temp) (gud-call "stop at \"%s\":%d" f n)) ;;;###autoload @@ -564,25 +574,30 @@ Obeying it means displaying in another window the specified file and line." (gud-call (car cmdlist)) (setq gud-command-queue (append gud-command-queue (cdr cmdlist)))) -(defun gud-apply-from-source (func) - ;; Apply a method from the gud buffer environment, passing it file and line. - ;; This is intended to be used for gud commands called from a source file. +(defun gud-apply-from-source (func &rest args) + ;; Apply a method from the gud buffer environment, passing it file + ;; and line, then ARGS. This is intended to be used for gud + ;; commands called from a source file. (if (not buffer-file-name) (error "There is no file associated with this buffer")) (let ((file (file-name-nondirectory buffer-file-name)) (line (save-restriction (widen) (1+ (count-lines 1 (point)))))) (save-excursion (gud-set-buffer) - (funcall func - (get-buffer-process current-gud-buffer) - file - line) + (apply func + (get-buffer-process current-gud-buffer) + file + line + args) ))) -(defun gud-break () - "Set breakpoint at this source line." - (interactive) - (gud-apply-from-source 'gud-set-break)) +(defun gud-break (arg) + "Set breakpoint at this source line. +With prefix argument, set a temporary breakpoint, if the debugger in +use supports such things. (A temporary breakpoint is one which will +be deleted when it is reached.)" + (interactive "P") + (gud-apply-from-source 'gud-set-break arg)) (defun gud-read-address () "Return a string containing the core-address found in the buffer at point." |