changeset 71090:d135a47c9bbe

Move gdb-mouse-toggle-breakpoint-* to C-mouse-1. Move gdb-mouse-until to mouse-3, gdb-mouse-jump to C-mouse-3 (for 2 button mice). (gdb-send): Do the right thing for C-d.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 30 May 2006 08:07:44 +0000
parents c4ecfff10bf7
children 3407291ee367
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 19 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Tue May 30 08:06:01 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Tue May 30 08:07:44 2006 +0000
@@ -71,11 +71,11 @@
 ;;; Known Bugs:
 
 ;; 1) Strings that are watched don't update in the speedbar when their
-;; contents change unless the first character changes.
+;;    contents change unless the first character changes.
 ;; 2) Cannot handle multiple debug sessions.
-;; 3) Initially, the assembler buffer does not display the cursor at the
-;; current line if the line is not visible in the window (but when testing
-;; gdb-assembler-custom with a lisp debugger it does!).
+;; 3) M-x gdb doesn't work with "run" command in .gdbinit, use M-x gdba instead.
+;; 4) M-x gdb doesn't work if the corefile is specified in the command in the
+;;    minibuffer, use M-x gdba instead (or specify the core in the GUD buffer).
 
 ;;; Problems with watch expressions, GDB/MI:
 ;; 1) They go out of scope when the inferior is re-run.
@@ -83,15 +83,10 @@
 ;; 3) VARNUM increments even when variable object is not created
 ;;    (maybe trivial).
 
-;; Known Bugs:
-;; 1) M-x gdb doesn't work with "run" command in .gdbinit, use M-x gdba instead.
-
 ;;; TODO:
 ;; 1) Use MI command -data-read-memory for memory window.
 ;; 2) Use tree-widget.el instead of the speedbar for watch-expressions?
 ;; 3) Mark breakpoint locations on scroll-bar of source buffer?
-;; 4) With gud-print and gud-pstar, print the variable name in the GUD
-;;    buffer instead of the value's history number.
 
 ;;; Code:
 
@@ -493,26 +488,28 @@
     'gdb-mouse-set-clear-breakpoint)
   (define-key gud-minor-mode-map [left-fringe mouse-1]
     'gdb-mouse-set-clear-breakpoint)
-  (define-key gud-minor-mode-map [left-fringe mouse-2]
-    'gdb-mouse-until)
+   (define-key gud-minor-mode-map [left-margin C-mouse-1]
+    'gdb-mouse-toggle-breakpoint-margin)
+  (define-key gud-minor-mode-map [left-fringe C-mouse-1]
+    'gdb-mouse-toggle-breakpoint-fringe)
+
   (define-key gud-minor-mode-map [left-margin drag-mouse-1]
     '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]
+  (define-key gud-minor-mode-map [left-margin mouse-3]
     'gdb-mouse-until)
+  (define-key gud-minor-mode-map [left-fringe mouse-3]
+    'gdb-mouse-until)
+
   (define-key gud-minor-mode-map [left-margin C-drag-mouse-1]
     'gdb-mouse-jump)
   (define-key gud-minor-mode-map [left-fringe C-drag-mouse-1]
     'gdb-mouse-jump)
-  (define-key gud-minor-mode-map [left-fringe C-mouse-2]
-    'gdb-mouse-jump)
-  (define-key gud-minor-mode-map [left-margin C-mouse-2]
+  (define-key gud-minor-mode-map [left-fringe C-mouse-3]
     'gdb-mouse-jump)
-   (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]
-    'gdb-mouse-toggle-breakpoint-fringe)
+  (define-key gud-minor-mode-map [left-margin C-mouse-3]
+    'gdb-mouse-jump)
 
   (setq comint-input-sender 'gdb-send)
 
@@ -738,7 +735,7 @@
 	  `(lambda () (gdb-var-evaluate-expression-handler
 		       ,(car var) nil)))))
     (if (search-forward "Undefined command" nil t)
-	(message-box "Watching expressions requires gdb 6.0 onwards")
+	(message-box "Watching expressions requires GDB 6.0 onwards")
       (message-box "No symbol \"%s\" in current context." expr))))
 
 (defun gdb-speedbar-update ()
@@ -1106,7 +1103,8 @@
 	  (let ((item (concat string "\n")))
 	    (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
 	    (process-send-string proc item)))
-      (if (string-match "\\\\$" string)
+      (if (and (string-match "\\\\$" string)
+	       (not comint-input-sender-no-newline)) ;;Try to catch C-d.
 	  (setq gdb-continuation (concat gdb-continuation string "\n"))
 	(let ((item (concat gdb-continuation string "\n")))
 	  (gdb-enqueue-input item)