aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/gdb-ui.el37
1 files changed, 22 insertions, 15 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index bf4004fabd3..e714fa3d7fb 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -41,7 +41,7 @@
41;; You don't need to know about annotations to use this mode as a debugger, 41;; You don't need to know about annotations to use this mode as a debugger,
42;; but if you are interested developing the mode itself, then see the 42;; but if you are interested developing the mode itself, then see the
43;; Annotations section in the GDB info manual. 43;; Annotations section in the GDB info manual.
44;; 44
45;; GDB developers plan to make the annotation interface obsolete. A new 45;; GDB developers plan to make the annotation interface obsolete. A new
46;; interface called GDB/MI (machine interface) has been designed to replace 46;; interface called GDB/MI (machine interface) has been designed to replace
47;; it. Some GDB/MI commands are used in this file through the CLI command 47;; it. Some GDB/MI commands are used in this file through the CLI command
@@ -49,29 +49,32 @@
49;; GDB (6.2 onwards) that uses GDB/MI as the primary interface to GDB. It is 49;; GDB (6.2 onwards) that uses GDB/MI as the primary interface to GDB. It is
50;; still under development and is part of a process to migrate Emacs from 50;; still under development and is part of a process to migrate Emacs from
51;; annotations to GDB/MI. 51;; annotations to GDB/MI.
52;; 52
53;; This mode SHOULD WORK WITH GDB 5.0 ONWARDS but you will NEED GDB 6.0 53;; This mode SHOULD WORK WITH GDB 5.0 onwards but you will NEED GDB 6.0
54;; ONWARDS TO USE WATCH EXPRESSIONS. 54;; onwards to use watch expressions.
55;; 55
56;; Windows Platforms: 56;;; Windows Platforms:
57;; 57
58;; If you are using Emacs and GDB on Windows you will need to flush the buffer 58;; If you are using Emacs and GDB on Windows you will need to flush the buffer
59;; explicitly in your program if you want timely display of I/O in Emacs. 59;; explicitly in your program if you want timely display of I/O in Emacs.
60;; Alternatively you can make the output stream unbuffered, for example, by 60;; Alternatively you can make the output stream unbuffered, for example, by
61;; using a macro: 61;; using a macro:
62;; 62
63;; #ifdef UNBUFFERED 63;; #ifdef UNBUFFERED
64;; setvbuf (stdout, (char *) NULL, _IONBF, 0); 64;; setvbuf (stdout, (char *) NULL, _IONBF, 0);
65;; #endif 65;; #endif
66;; 66
67;; and compiling with -DUNBUFFERED while debugging. 67;; and compiling with -DUNBUFFERED while debugging.
68;; 68
69;; Known Bugs: 69;;; Known Bugs:
70
70;; 1) Strings that are watched don't update in the speedbar when their 71;; 1) Strings that are watched don't update in the speedbar when their
71;; contents change. 72;; contents change.
72;; 2) Watch expressions go out of scope when the inferior is re-run. 73;; 2) Watch expressions go out of scope when the inferior is re-run.
73;; 74;; 3) Cannot handle multiple debug sessions.
74;; TODO: 75
76;;; TODO:
77
75;; 1) Use MI command -data-read-memory for memory window. 78;; 1) Use MI command -data-read-memory for memory window.
76;; 2) Highlight changed register values (use MI commands 79;; 2) Highlight changed register values (use MI commands
77;; -data-list-register-values and -data-list-changed-registers instead 80;; -data-list-register-values and -data-list-changed-registers instead
@@ -400,6 +403,8 @@ With arg, use separate IO iff arg is positive."
400 'gdb-mouse-until) 403 'gdb-mouse-until)
401 (define-key gud-minor-mode-map [left-fringe drag-mouse-1] 404 (define-key gud-minor-mode-map [left-fringe drag-mouse-1]
402 'gdb-mouse-until) 405 'gdb-mouse-until)
406 (define-key gud-minor-mode-map [left-margin mouse-2]
407 'gdb-mouse-until)
403 (define-key gud-minor-mode-map [left-margin mouse-3] 408 (define-key gud-minor-mode-map [left-margin mouse-3]
404 'gdb-mouse-toggle-breakpoint-margin) 409 'gdb-mouse-toggle-breakpoint-margin)
405 (define-key gud-minor-mode-map [left-fringe mouse-3] 410 (define-key gud-minor-mode-map [left-fringe mouse-3]
@@ -1567,7 +1572,7 @@ static char *magick[] = {
1567 (suppress-keymap map) 1572 (suppress-keymap map)
1568 (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu)) 1573 (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu))
1569 (define-key map " " 'gdb-toggle-breakpoint) 1574 (define-key map " " 'gdb-toggle-breakpoint)
1570 (define-key map "d" 'gdb-delete-breakpoint) 1575 (define-key map "D" 'gdb-delete-breakpoint)
1571 (define-key map "q" 'kill-this-buffer) 1576 (define-key map "q" 'kill-this-buffer)
1572 (define-key map "\r" 'gdb-goto-breakpoint) 1577 (define-key map "\r" 'gdb-goto-breakpoint)
1573 (define-key map [mouse-2] 'gdb-goto-breakpoint) 1578 (define-key map [mouse-2] 'gdb-goto-breakpoint)
@@ -1740,7 +1745,8 @@ static char *magick[] = {
1740(defun gdb-get-frame-number () 1745(defun gdb-get-frame-number ()
1741 (save-excursion 1746 (save-excursion
1742 (end-of-line) 1747 (end-of-line)
1743 (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t)) 1748 (let* ((start (line-beginning-position))
1749 (pos (re-search-backward "^#*\\([0-9]+\\)" start t))
1744 (n (or (and pos (match-string-no-properties 1)) "0"))) 1750 (n (or (and pos (match-string-no-properties 1)) "0")))
1745 n))) 1751 n)))
1746 1752
@@ -1800,6 +1806,7 @@ static char *magick[] = {
1800 (define-key map "q" 'kill-this-buffer) 1806 (define-key map "q" 'kill-this-buffer)
1801 (define-key map "\r" 'gdb-threads-select) 1807 (define-key map "\r" 'gdb-threads-select)
1802 (define-key map [mouse-2] 'gdb-threads-select) 1808 (define-key map [mouse-2] 'gdb-threads-select)
1809 (define-key map [follow-link] 'mouse-face)
1803 map)) 1810 map))
1804 1811
1805(defvar gdb-threads-font-lock-keywords 1812(defvar gdb-threads-font-lock-keywords