changeset 67233:f8729e3300dc

(gdb-ann3): Bind mouse-2 to gdb-mouse-until in the margin also. (gdb-breakpoints-mode-map): Use D instead of d for gdb-delete-breakpoint. (gdb-get-frame-number): Require a number to match on. (gdb-threads-mode-map): Add follow-link binding.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 01 Dec 2005 02:17:15 +0000
parents 003d50ec9805
children f1564d57f6a1 1955a4462bf9
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 22 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Thu Dec 01 02:15:56 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Thu Dec 01 02:17:15 2005 +0000
@@ -41,7 +41,7 @@
 ;; You don't need to know about annotations to use this mode as a debugger,
 ;; but if you are interested developing the mode itself, then see the
 ;; Annotations section in the GDB info manual.
-;;
+
 ;; GDB developers plan to make the annotation interface obsolete.  A new
 ;; interface called GDB/MI (machine interface) has been designed to replace
 ;; it.  Some GDB/MI commands are used in this file through the CLI command
@@ -49,29 +49,32 @@
 ;; GDB (6.2 onwards) that uses GDB/MI as the primary interface to GDB.  It is
 ;; still under development and is part of a process to migrate Emacs from
 ;; annotations to GDB/MI.
-;;
-;; This mode SHOULD WORK WITH GDB 5.0 ONWARDS but you will NEED GDB 6.0
-;; ONWARDS TO USE WATCH EXPRESSIONS.
-;;
-;; Windows Platforms:
-;;
+
+;; This mode SHOULD WORK WITH GDB 5.0 onwards but you will NEED GDB 6.0
+;; onwards to use watch expressions.
+
+;;; Windows Platforms:
+
 ;; If you are using Emacs and GDB on Windows you will need to flush the buffer
 ;; explicitly in your program if you want timely display of I/O in Emacs.
 ;; Alternatively you can make the output stream unbuffered, for example, by
 ;; using a macro:
-;;
+
 ;;           #ifdef UNBUFFERED
 ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
 ;;	     #endif
-;;
+
 ;; and compiling with -DUNBUFFERED while debugging.
-;;
-;; Known Bugs:
+
+;;; Known Bugs:
+
 ;; 1) Strings that are watched don't update in the speedbar when their
 ;; contents change.
 ;; 2) Watch expressions go out of scope when the inferior is re-run.
-;;
-;; TODO:
+;; 3) Cannot handle multiple debug sessions.
+
+;;; TODO:
+
 ;; 1) Use MI command -data-read-memory for memory window.
 ;; 2) Highlight changed register values (use MI commands
 ;;    -data-list-register-values and -data-list-changed-registers instead
@@ -400,6 +403,8 @@
     'gdb-mouse-until)
   (define-key gud-minor-mode-map [left-fringe drag-mouse-1]
     'gdb-mouse-until)
+  (define-key gud-minor-mode-map [left-margin mouse-2]
+    'gdb-mouse-until)
   (define-key gud-minor-mode-map [left-margin mouse-3]
     'gdb-mouse-toggle-breakpoint-margin)
   (define-key gud-minor-mode-map [left-fringe mouse-3]
@@ -1567,7 +1572,7 @@
     (suppress-keymap map)
     (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu))
     (define-key map " " 'gdb-toggle-breakpoint)
-    (define-key map "d" 'gdb-delete-breakpoint)
+    (define-key map "D" 'gdb-delete-breakpoint)
     (define-key map "q" 'kill-this-buffer)
     (define-key map "\r" 'gdb-goto-breakpoint)
     (define-key map [mouse-2] 'gdb-goto-breakpoint)
@@ -1740,7 +1745,8 @@
 (defun gdb-get-frame-number ()
   (save-excursion
     (end-of-line)
-    (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t))
+    (let* ((start (line-beginning-position))
+	   (pos (re-search-backward "^#*\\([0-9]+\\)" start t))
 	   (n (or (and pos (match-string-no-properties 1)) "0")))
       n)))
 
@@ -1800,6 +1806,7 @@
     (define-key map "q" 'kill-this-buffer)
     (define-key map "\r" 'gdb-threads-select)
     (define-key map [mouse-2] 'gdb-threads-select)
+    (define-key map [follow-link] 'mouse-face)
     map))
 
 (defvar gdb-threads-font-lock-keywords