diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-08 01:59:01 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-08 01:59:01 +0000 |
commit | 296fa52f190017fe210fda1915bbd00a1141bc13 (patch) | |
tree | 337825d0614a59d0223c61c3f982f68a88d7f196 /gdb/gdba.el | |
parent | 3e873a96c3f6ee40cdbb6518816d9b263fd8cc30 (diff) | |
download | gdb-296fa52f190017fe210fda1915bbd00a1141bc13.zip gdb-296fa52f190017fe210fda1915bbd00a1141bc13.tar.gz gdb-296fa52f190017fe210fda1915bbd00a1141bc13.tar.bz2 |
Add a major mode for the breakpoints window.
Diffstat (limited to 'gdb/gdba.el')
-rw-r--r-- | gdb/gdba.el | 76 |
1 files changed, 56 insertions, 20 deletions
diff --git a/gdb/gdba.el b/gdb/gdba.el index 5f7d52a..09abd87 100644 --- a/gdb/gdba.el +++ b/gdb/gdba.el @@ -335,7 +335,8 @@ program." (gdb-registers-buffer gdb-registers-buffer-name) (gdb-breakpoints-buffer - gdb-breakpoints-buffer-name) + gdb-breakpoints-buffer-name + gud-breakpoints-mode) (gdb-frames-buffer gdb-frames-buffer-name))) @@ -798,6 +799,8 @@ The key should be one of the cars in `gdb-instance-buffer-rules-assoc'." (setq gdb-buffer-type key) (make-variable-buffer-local 'gdb-buffer-instance) (setq gdb-buffer-instance instance) + (if (cdr (cdr rules)) + (funcall (car (cdr (cdr rules))))) new)))) (defun gdb-rules-name-maker (rules) (car (cdr rules))) @@ -867,6 +870,58 @@ The key should be one of the cars in `gdb-instance-buffer-rules-assoc'." 'gdb-breakpoints-buffer))) +(defun gud-toggle-bp-this-line () + (interactive) + (save-excursion + (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))) + ))) + +(defun gud-delete-bp-this-line () + (interactive) + (save-excursion + (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 + "server delete " + (buffer-substring (match-beginning 0) + (match-end 1)) + "\n") + '(lambda () nil))) + ))) + +(defvar gud-breakpoints-mode-map nil) + +(defun gud-breakpoints-mode () + "Major mode for gud breakpoints. + +\\{gud-breakpoints-mode-map}" + (setq major-mode 'gud-breakpoints-mode) + (setq mode-name "Breakpoints") + (use-local-map gud-breakpoints-mode-map)) + +(if gud-breakpoints-mode-map + nil + (setq gud-breakpoints-mode-map (make-sparse-keymap)) + (define-key gud-breakpoints-mode-map " " 'gud-toggle-bp-this-line) + (define-key gud-breakpoints-mode-map "d" 'gud-delete-bp-this-line)) + ;; ;; Registers buffers ;; @@ -1831,22 +1886,3 @@ Link exprs of the form: (provide 'gud) ;;; gud.el ends here - -(defun gdb-toggle-bp-this-line () - (interactive) - (save-excursion - (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))) - ))) |