emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el [emacs-unicode-2


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el [emacs-unicode-2]
Date: Mon, 05 Jul 2004 23:00:48 -0400

Index: emacs/lisp/progmodes/gdb-ui.el
diff -c emacs/lisp/progmodes/gdb-ui.el:1.7.2.3 
emacs/lisp/progmodes/gdb-ui.el:1.7.2.4
*** emacs/lisp/progmodes/gdb-ui.el:1.7.2.3      Tue Jun 29 16:45:26 2004
--- emacs/lisp/progmodes/gdb-ui.el      Tue Jul  6 02:56:14 2004
***************
*** 1202,1249 ****
    (interactive)
    (save-excursion
      (beginning-of-line 1)
!     (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)"))
!       (error "Not recognized as break/watchpoint line")
!       (gdb-enqueue-input
!        (list
!       (concat
!        (if (eq ?y (char-after (match-beginning 2)))
!            (concat gdb-server-prefix "disable ")
!          (concat gdb-server-prefix "enable "))
!        (match-string 1) "\n")
!       'ignore)))))
  
  (defun gdb-delete-breakpoint ()
    "Delete the breakpoint at current line."
    (interactive)
    (beginning-of-line 1)
!   (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)"))
!       (error "Not recognized as break/watchpoint line")
!     (gdb-enqueue-input
!      (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 
'ignore))))
  
  (defun gdb-goto-breakpoint ()
    "Display the breakpoint location specified at current line."
    (interactive)
    (save-excursion
      (beginning-of-line 1)
!     (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
!       (progn
!         (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t)
!         (looking-at "\\(\\S-*\\):\\([0-9]+\\)"))
!     (looking-at
!      
"[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)")))
!   (if (match-string 2)
!       (let ((line (match-string 2))
!           (file (match-string 1)))
!       (save-selected-window
!         (let* ((buf (find-file-noselect (if (file-exists-p file)
!                                             file
!                                           (expand-file-name file gdb-cdir))))
!                (window (gdb-display-buffer buf)))
!                (with-current-buffer buf
!                  (goto-line (string-to-number line))
!                  (set-window-point window (point))))))))
  
  (defun gdb-mouse-goto-breakpoint (event)
    "Display the breakpoint location that you click on."
--- 1202,1253 ----
    (interactive)
    (save-excursion
      (beginning-of-line 1)
!     (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
!           (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
!         (looking-at
!       
"\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
!       (gdb-enqueue-input
!        (list
!         (concat gdb-server-prefix
!                 (if (eq ?y (char-after (match-beginning 2)))
!                     "disable "
!                   "enable ")
!                 (match-string 1) "\n") 'ignore))
!       (error "Not recognized as break/watchpoint line"))))
  
  (defun gdb-delete-breakpoint ()
    "Delete the breakpoint at current line."
    (interactive)
    (beginning-of-line 1)
!   (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
!         (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
!       (looking-at
!        "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
!       (gdb-enqueue-input
!        (list
!       (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
!     (error "Not recognized as break/watchpoint line")))
  
  (defun gdb-goto-breakpoint ()
    "Display the breakpoint location specified at current line."
    (interactive)
    (save-excursion
      (beginning-of-line 1)
!     (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
!           (looking-at ".*in\\s-+\\S-+\\s-+at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
!         (looking-at
!      
"[0-9]+\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))
!       (let ((line (match-string 2))
!             (file (match-string 1)))
!         (save-selected-window
!           (let* ((buf (find-file-noselect (if (file-exists-p file)
!                                               file
!                                             (expand-file-name file 
gdb-cdir))))
!                  (window (gdb-display-buffer buf)))
!             (with-current-buffer buf
!               (goto-line (string-to-number line))
!               (set-window-point window (point))))))
!       (error "Not recognized as break/watchpoint line"))))
  
  (defun gdb-mouse-goto-breakpoint (event)
    "Display the breakpoint location that you click on."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]