diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-08 01:21:24 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-08 01:21:24 +0000 |
commit | 3e873a96c3f6ee40cdbb6518816d9b263fd8cc30 (patch) | |
tree | b8a8f9ec03f17fa1b90447754059a73fc4c274d0 /gdb/gdba.el | |
parent | ab678720c78c016a77ac857f94f43e15842c0865 (diff) | |
download | gdb-3e873a96c3f6ee40cdbb6518816d9b263fd8cc30.zip gdb-3e873a96c3f6ee40cdbb6518816d9b263fd8cc30.tar.gz gdb-3e873a96c3f6ee40cdbb6518816d9b263fd8cc30.tar.bz2 |
Fix typo in gdb-goto-first-gdb-instance.
Re-write gdb-look-for-tagged-buffer to avoid recursion (I was getting
errors because of too much nesting, obviously elisp lacks tail
recursion optimization)
Fix toggle-bp-this-line for new ways of communicating with gdb and
rename to gdb-toggle-bp-this-line.
Diffstat (limited to 'gdb/gdba.el')
-rw-r--r-- | gdb/gdba.el | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/gdb/gdba.el b/gdb/gdba.el index 07cb91e..5f7d52a 100644 --- a/gdb/gdba.el +++ b/gdb/gdba.el @@ -293,7 +293,7 @@ handlers.") (or (and gdb-buffer-instance (eq gdb-buffer-type 'gud) (car blist)) - (gdb-find-first-gdb-instance (cdr blist)))))) + (gdb-goto-first-gdb-instance (cdr blist)))))) (defun buffer-gdb-instance (buf) (save-excursion @@ -803,12 +803,15 @@ The key should be one of the cars in `gdb-instance-buffer-rules-assoc'." (defun gdb-rules-name-maker (rules) (car (cdr rules))) (defun gdb-look-for-tagged-buffer (instance key bufs) - (and bufs - (set-buffer (car bufs)) - (or (and (eq gdb-buffer-instance instance) - (eq gdb-buffer-type key) - (car bufs)) - (gdb-look-for-tagged-buffer instance key (cdr bufs))))) + (let ((retval nil)) + (while (and (not retval) bufs) + (set-buffer (car bufs)) + (if (and (eq gdb-buffer-instance instance) + (eq gdb-buffer-type key)) + (setq retval (car bufs))) + (setq bufs (cdr bufs)) + ) + retval)) (defun gdb-instance-buffer-p (buf) (save-excursion @@ -1829,21 +1832,21 @@ Link exprs of the form: ;;; gud.el ends here -(defun toggle-bp-this-line () +(defun gdb-toggle-bp-this-line () (interactive) (save-excursion - (let (bp-num bp-state) - (beginning-of-line 1) - (if (not (looking-at "\\([0-9]*\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)")) - (error "Not recognized as breakpoint line (demo foo).") - (process-send-string - gdb-buffer-process!!! - (concat - (if (eq ?y (char-after (match-beginning 2))) - "server disable " - "server enable ") - (buffer-substring (match-beginning 0) - (match-end 1)) - "\n")))))) - - + (beginning-of-line 1) + (if (not (looking-at "\\([0-9]*\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)")) + (error "Not recognized as breakpoint line (demo foo).") + (gdb-instance-enqueue-idle-input + gdb-buffer-instance + (list + (concat + (if (eq ?y (char-after (match-beginning 2))) + "server disable " + "server enable ") + (buffer-substring (match-beginning 0) + (match-end 1)) + "\n") + '(lambda () nil))) + ))) |