Commit 3db614b0 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/gdb-mi.el: Fit in 80 columns.

(gdb-setup-windows, gdb-restore-windows): Avoid other-window and
switch-to-buffer.
parent 7dbfa719
2011-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/gdb-mi.el: Fit in 80 columns.
(gdb-setup-windows, gdb-restore-windows): Avoid other-window and
switch-to-buffer.
* progmodes/which-func.el (which-func-ff-hook): Don't output a message
if imenu is simply not configured (bug#8941).
......@@ -16,7 +20,6 @@
(allout-widgets-mode): Include allout-widgets-after-undo-function
on the new allout-post-undo-hook.
2011-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-abbrev-table):
......
......@@ -104,7 +104,8 @@
(require 'bindat)
(eval-when-compile (require 'cl))
(declare-function speedbar-change-initial-expansion-list "speedbar" (new-default))
(declare-function speedbar-change-initial-expansion-list
"speedbar" (new-default))
(declare-function speedbar-timer-fn "speedbar" ())
(declare-function speedbar-line-text "speedbar" (&optional p))
(declare-function speedbar-change-expand-button-char "speedbar" (char))
......@@ -190,7 +191,8 @@ as returned from \"-break-list\" by `gdb-json-partial-output'
(defvar gdb-current-language nil)
(defvar gdb-var-list nil
"List of variables in watch window.
Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS HAS_MORE FP)
Each element has the form
(VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS HAS_MORE FP)
where STATUS is nil (`unchanged'), `changed' or `out-of-scope', FP the frame
address for root variables.")
(defvar gdb-main-file nil "Source file from which program execution begins.")
......@@ -329,7 +331,7 @@ valid signal handlers.")
"Maximum size of `gdb-debug-log'. If nil, size is unlimited."
:group 'gdb
:type '(choice (integer :tag "Number of elements")
(const :tag "Unlimited" nil))
(const :tag "Unlimited" nil))
:version "22.1")
(defcustom gdb-non-stop-setting t
......@@ -367,13 +369,18 @@ Emacs always switches to the thread which caused the stop."
(set :tag "Selection of reasons..."
(const :tag "A breakpoint was reached." "breakpoint-hit")
(const :tag "A watchpoint was triggered." "watchpoint-trigger")
(const :tag "A read watchpoint was triggered." "read-watchpoint-trigger")
(const :tag "An access watchpoint was triggered." "access-watchpoint-trigger")
(const :tag "A read watchpoint was triggered."
"read-watchpoint-trigger")
(const :tag "An access watchpoint was triggered."
"access-watchpoint-trigger")
(const :tag "Function finished execution." "function-finished")
(const :tag "Location reached." "location-reached")
(const :tag "Watchpoint has gone out of scope" "watchpoint-scope")
(const :tag "End of stepping range reached." "end-stepping-range")
(const :tag "Signal received (like interruption)." "signal-received"))
(const :tag "Watchpoint has gone out of scope"
"watchpoint-scope")
(const :tag "End of stepping range reached."
"end-stepping-range")
(const :tag "Signal received (like interruption)."
"signal-received"))
(const :tag "None" nil))
:group 'gdb-non-stop
:version "23.2"
......@@ -488,17 +495,17 @@ predefined macros."
:group 'gdb
:version "22.1")
(defcustom gdb-create-source-file-list t
"Non-nil means create a list of files from which the executable was built.
(defcustom gdb-create-source-file-list t
"Non-nil means create a list of files from which the executable was built.
Set this to nil if the GUD buffer displays \"initializing...\" in the mode
line for a long time when starting, possibly because your executable was
built from a large number of files. This allows quicker initialization
but means that these files are not automatically enabled for debugging,
e.g., you won't be able to click in the fringe to set a breakpoint until
execution has already stopped there."
:type 'boolean
:group 'gdb
:version "23.1")
:type 'boolean
:group 'gdb
:version "23.1")
(defcustom gdb-show-main nil
"Non-nil means display source file containing the main routine at startup.
......@@ -644,12 +651,12 @@ detailed description of this mode.
(interactive (list (gud-query-cmdline 'gdb)))
(when (and gud-comint-buffer
(buffer-name gud-comint-buffer)
(get-buffer-process gud-comint-buffer)
(with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
(gdb-restore-windows)
(error
"Multiple debugging requires restarting in text command mode"))
(buffer-name gud-comint-buffer)
(get-buffer-process gud-comint-buffer)
(with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
(gdb-restore-windows)
(error
"Multiple debugging requires restarting in text command mode"))
;;
(gud-common-init command-line nil 'gud-gdbmi-marker-filter)
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
......@@ -663,7 +670,7 @@ detailed description of this mode.
(hsize (getenv "HISTSIZE")))
(dolist (file (append '("~/.gdbinit")
(unless (string-equal (expand-file-name ".")
(expand-file-name "~"))
(expand-file-name "~"))
'(".gdbinit"))))
(if (file-readable-p (setq file (expand-file-name file)))
(with-temp-buffer
......@@ -763,7 +770,7 @@ detailed description of this mode.
'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-margin C-mouse-1]
(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)
......@@ -849,11 +856,11 @@ detailed description of this mode.
;; find source file and compilation directory here
(gdb-input
; Needs GDB 6.2 onwards.
; Needs GDB 6.2 onwards.
(list "-file-list-exec-source-files" 'gdb-get-source-file-list))
(if gdb-create-source-file-list
(gdb-input
; Needs GDB 6.0 onwards.
; Needs GDB 6.0 onwards.
(list "-file-list-exec-source-file" 'gdb-get-source-file)))
(gdb-input
(list "-gdb-show prompt" 'gdb-get-prompt)))
......@@ -862,7 +869,8 @@ detailed description of this mode.
(goto-char (point-min))
(if (re-search-forward "No symbol" nil t)
(progn
(message "This version of GDB doesn't support non-stop mode. Turning it off.")
(message
"This version of GDB doesn't support non-stop mode. Turning it off.")
(setq gdb-non-stop nil)
(setq gdb-version "pre-7.0"))
(setq gdb-version "7.0+")
......@@ -885,8 +893,8 @@ detailed description of this mode.
(list t nil) nil "-c"
(concat gdb-cpp-define-alist-program " "
gdb-cpp-define-alist-flags))))))
(define-list (split-string output "\n" t))
(name))
(define-list (split-string output "\n" t))
(name))
(setq gdb-define-alist nil)
(dolist (define define-list)
(setq name (nth 1 (split-string define "[( ]")))
......@@ -896,13 +904,13 @@ detailed description of this mode.
(defvar tooltip-use-echo-area)
(defun gdb-tooltip-print (expr)
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(goto-char (point-min))
(if (re-search-forward ".*value=\\(\".*\"\\)" nil t)
(tooltip-show
(concat expr " = " (read (match-string 1)))
(or gud-tooltip-echo-area tooltip-use-echo-area
(not (display-graphic-p)))))))
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(goto-char (point-min))
(if (re-search-forward ".*value=\\(\".*\"\\)" nil t)
(tooltip-show
(concat expr " = " (read (match-string 1)))
(or gud-tooltip-echo-area tooltip-use-echo-area
(not (display-graphic-p)))))))
;; If expr is a macro for a function don't print because of possible dangerous
;; side-effects. Also printing a function within a tooltip generates an
......@@ -926,13 +934,13 @@ detailed description of this mode.
(defmacro gdb-if-arrow (arrow-position &rest body)
`(if ,arrow-position
(let ((buffer (marker-buffer ,arrow-position)) (line))
(if (equal buffer (window-buffer (posn-window end)))
(with-current-buffer buffer
(when (or (equal start end)
(equal (posn-point start)
(marker-position ,arrow-position)))
,@body))))))
(let ((buffer (marker-buffer ,arrow-position)) (line))
(if (equal buffer (window-buffer (posn-window end)))
(with-current-buffer buffer
(when (or (equal start end)
(equal (posn-point start)
(marker-position ,arrow-position)))
,@body))))))
(defun gdb-mouse-until (event)
"Continue running until a source line past the current line.
......@@ -1063,7 +1071,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(bindat-get-field result 'value)
nil
(bindat-get-field result 'has_more)
gdb-frame-address)))
gdb-frame-address)))
(push var gdb-var-list)
(speedbar 1)
(unless (string-equal
......@@ -1094,20 +1102,20 @@ With arg, enter name of variable to be watched in the minibuffer."
(setcar (nthcdr 4 var) (read (match-string 1)))))
(gdb-speedbar-update))
; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
(defun gdb-var-list-children (varnum)
(gdb-input
(list (concat "-var-update " varnum) 'ignore))
(gdb-input
(list (concat "-var-list-children --all-values "
varnum)
`(lambda () (gdb-var-list-children-handler ,varnum)))))
varnum)
`(lambda () (gdb-var-list-children-handler ,varnum)))))
(defun gdb-var-list-children-handler (varnum)
(let* ((var-list nil)
(output (bindat-get-field (gdb-json-partial-output "child")))
(children (bindat-get-field output 'children)))
(catch 'child-already-watched
(catch 'child-already-watched
(dolist (var gdb-var-list)
(if (string-equal varnum (car var))
(progn
......@@ -1150,11 +1158,11 @@ With arg, enter name of variable to be watched in the minibuffer."
(interactive)
(let ((text (speedbar-line-text)))
(string-match "\\(\\S-+\\)" text)
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)))
(if (string-match "\\." (car var))
(message-box "Can only delete a root expression")
(gdb-var-delete-1 var varnum)))))
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)))
(if (string-match "\\." (car var))
(message-box "Can only delete a root expression")
(gdb-var-delete-1 var varnum)))))
(defun gdb-var-delete-children (varnum)
"Delete children of variable object at point from the speedbar."
......@@ -1177,7 +1185,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(if (re-search-forward gdb-error-regexp nil t)
(message-box "Invalid number or expression (%s)" value)))
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
(defun gdb-var-update ()
(if (not (gdb-pending-p 'gdb-var-update))
(gdb-input
......@@ -1213,38 +1221,38 @@ With arg, enter name of variable to be watched in the minibuffer."
(gdb-var-delete-1 var varnum)))))
(let ((var-list nil) var1
(children (bindat-get-field change 'new_children)))
(if new-num
(progn
(setq var1 (pop temp-var-list))
(while var1
(if (string-equal varnum (car var1))
(let ((new (string-to-number new-num))
(previous (string-to-number (nth 2 var1))))
(setcar (nthcdr 2 var1) new-num)
(push var1 var-list)
(cond ((> new previous)
;; Add new children to list.
(dotimes (dummy previous)
(push (pop temp-var-list) var-list))
(dolist (child children)
(let ((varchild
(list (bindat-get-field child 'name)
(bindat-get-field child 'exp)
(bindat-get-field child 'numchild)
(bindat-get-field child 'type)
(bindat-get-field child 'value)
'changed
(bindat-get-field child 'has_more))))
(push varchild var-list))))
;; Remove deleted children from list.
((< new previous)
(dotimes (dummy new)
(push (pop temp-var-list) var-list))
(dotimes (dummy (- previous new))
(pop temp-var-list)))))
(push var1 var-list))
(setq var1 (pop temp-var-list)))
(setq gdb-var-list (nreverse var-list)))))))))
(when new-num
(setq var1 (pop temp-var-list))
(while var1
(if (string-equal varnum (car var1))
(let ((new (string-to-number new-num))
(previous (string-to-number (nth 2 var1))))
(setcar (nthcdr 2 var1) new-num)
(push var1 var-list)
(cond
((> new previous)
;; Add new children to list.
(dotimes (dummy previous)
(push (pop temp-var-list) var-list))
(dolist (child children)
(let ((varchild
(list (bindat-get-field child 'name)
(bindat-get-field child 'exp)
(bindat-get-field child 'numchild)
(bindat-get-field child 'type)
(bindat-get-field child 'value)
'changed
(bindat-get-field child 'has_more))))
(push varchild var-list))))
;; Remove deleted children from list.
((< new previous)
(dotimes (dummy new)
(push (pop temp-var-list) var-list))
(dotimes (dummy (- previous new))
(pop temp-var-list)))))
(push var1 var-list))
(setq var1 (pop temp-var-list)))
(setq gdb-var-list (nreverse var-list))))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(gdb-speedbar-update))
......@@ -1372,7 +1380,8 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
(when trigger
(gdb-add-subscriber gdb-buf-publisher
(cons (current-buffer)
(gdb-bind-function-to-buffer trigger (current-buffer))))
(gdb-bind-function-to-buffer
trigger (current-buffer))))
(funcall trigger 'start))
(current-buffer))))))
......@@ -1786,8 +1795,8 @@ is running."
;; visited breakpoint is, use that window.
(defun gdb-display-source-buffer (buffer)
(let* ((last-window (if gud-last-last-frame
(get-buffer-window
(gud-find-file (car gud-last-last-frame)))))
(get-buffer-window
(gud-find-file (car gud-last-last-frame)))))
(source-window (or last-window
(if (and gdb-source-window
(window-live-p gdb-source-window))
......@@ -1860,7 +1869,7 @@ is running."
;; Suppress "No registers." since GDB 6.8 and earlier duplicates MI
;; error message on internal stream. Don't print to GUD buffer.
(unless (and (eq record-type 'gdb-internals)
(string-equal (read arg1) "No registers.\n"))
(string-equal (read arg1) "No registers.\n"))
(funcall record-type arg1))))))
(setq gdb-output-sink 'user)
......@@ -1884,15 +1893,15 @@ is running."
(defun gdb-thread-exited (output-field)
"Handle =thread-exited async record: unset `gdb-thread-number'
if current thread exited and update threads list."
(let* ((thread-id (bindat-get-field (gdb-json-string output-field) 'id)))
(if (string= gdb-thread-number thread-id)
(gdb-setq-thread-number nil))
;; When we continue current thread and it quickly exits,
;; gdb-pending-triggers left after gdb-running disallow us to
;; properly call -thread-info without --thread option. Thus we
;; need to use gdb-wait-for-pending.
(gdb-wait-for-pending
(gdb-emit-signal gdb-buf-publisher 'update-threads))))
(let* ((thread-id (bindat-get-field (gdb-json-string output-field) 'id)))
(if (string= gdb-thread-number thread-id)
(gdb-setq-thread-number nil))
;; When we continue current thread and it quickly exits,
;; gdb-pending-triggers left after gdb-running disallow us to
;; properly call -thread-info without --thread option. Thus we
;; need to use gdb-wait-for-pending.
(gdb-wait-for-pending
(gdb-emit-signal gdb-buf-publisher 'update-threads))))
(defun gdb-thread-selected (output-field)
"Handler for =thread-selected MI output record.
......@@ -1912,7 +1921,8 @@ Sets `gdb-thread-number' to new id."
(gdb-update))))
(defun gdb-running (output-field)
(let* ((thread-id (bindat-get-field (gdb-json-string output-field) 'thread-id)))
(let* ((thread-id
(bindat-get-field (gdb-json-string output-field) 'thread-id)))
;; We reset gdb-frame-number to nil if current thread has gone
;; running. This can't be done in gdb-thread-list-handler-custom
;; because we need correct gdb-frame-number by the time
......@@ -1987,23 +1997,23 @@ current thread and update GDB buffers."
;; reasons
(if (or (eq gdb-switch-reasons t)
(member reason gdb-switch-reasons))
(when (not (string-equal gdb-thread-number thread-id))
(message (concat "Switched to thread " thread-id))
(gdb-setq-thread-number thread-id))
(when (not (string-equal gdb-thread-number thread-id))
(message (concat "Switched to thread " thread-id))
(gdb-setq-thread-number thread-id))
(message (format "Thread %s stopped" thread-id)))))
;; Print "(gdb)" to GUD console
(when gdb-first-done-or-error
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
;; Print "(gdb)" to GUD console
(when gdb-first-done-or-error
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
;; In non-stop, we update information as soon as another thread gets
;; stopped
(when (or gdb-first-done-or-error
gdb-non-stop)
;; In all-stop this updates gud-running properly as well.
(gdb-update)
(setq gdb-first-done-or-error nil))
(run-hook-with-args 'gdb-stopped-hooks result)))
;; In non-stop, we update information as soon as another thread gets
;; stopped
(when (or gdb-first-done-or-error
gdb-non-stop)
;; In all-stop this updates gud-running properly as well.
(gdb-update)
(setq gdb-first-done-or-error nil))
(run-hook-with-args 'gdb-stopped-hooks result)))
;; Remove the trimmings from log stream containing debugging messages
;; being produced by GDB's internals, use warning face and send to GUD
......@@ -2023,7 +2033,7 @@ current thread and update GDB buffers."
;; Remove the trimmings from the console stream and send to GUD buffer
;; (frontend MI commands should not print to this stream)
(defun gdb-console (output-field)
(setq gdb-filter-output
(setq gdb-filter-output
(gdb-concat-output
gdb-filter-output
(read output-field))))
......@@ -2036,11 +2046,11 @@ current thread and update GDB buffers."
(setq token-number nil)
;; MI error - send to minibuffer
(when (eq type 'error)
;; Skip "msg=" from `output-field'
(message (read (substring output-field 4)))
;; Don't send to the console twice. (If it is a console error
;; it is also in the console stream.)
(setq output-field nil)))
;; Skip "msg=" from `output-field'
(message (read (substring output-field 4)))
;; Don't send to the console twice. (If it is a console error
;; it is also in the console stream.)
(setq output-field nil)))
;; Output from command from frontend.
(setq gdb-output-sink 'emacs))
......@@ -2218,11 +2228,11 @@ calling `gdb-table-string'."
(append row-properties (list properties)))
(setf (gdb-table-column-sizes table)
(gdb-mapcar* (lambda (x s)
(let ((new-x
(max (abs x) (string-width (or s "")))))
(if right-align new-x (- new-x))))
(gdb-table-column-sizes table)
row))
(let ((new-x
(max (abs x) (string-width (or s "")))))
(if right-align new-x (- new-x))))
(gdb-table-column-sizes table)
row))
;; Avoid trailing whitespace at eol
(if (not (gdb-table-right-align table))
(setcar (last (gdb-table-column-sizes table)) 0))))
......@@ -2311,8 +2321,8 @@ If NOPRESERVE is non-nil, window point is not restored after CUSTOM-DEFUN."
'(set-window-point window p)))))
(defmacro def-gdb-trigger-and-handler (trigger-name gdb-command
handler-name custom-defun
&optional signal-list)
handler-name custom-defun
&optional signal-list)
"Define trigger and handler.
TRIGGER-NAME trigger is defined to send GDB-COMMAND. See
......@@ -2356,29 +2366,29 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
(pending (bindat-get-field breakpoint 'pending))
(func (bindat-get-field breakpoint 'func))
(type (bindat-get-field breakpoint 'type)))
(gdb-table-add-row table
(list
(bindat-get-field breakpoint 'number)
type
(bindat-get-field breakpoint 'disp)
(let ((flag (bindat-get-field breakpoint 'enabled)))
(if (string-equal flag "y")
(propertize "y" 'font-lock-face font-lock-warning-face)
(propertize "n" 'font-lock-face font-lock-comment-face)))
(bindat-get-field breakpoint 'addr)
(bindat-get-field breakpoint 'times)
(if (string-match ".*watchpoint" type)
(bindat-get-field breakpoint 'what)
(or pending at
(concat "in "
(propertize (or func "unknown")
'font-lock-face font-lock-function-name-face)
(gdb-frame-location breakpoint)))))
;; Add clickable properties only for breakpoints with file:line
;; information
(append (list 'gdb-breakpoint breakpoint)
(when func '(help-echo "mouse-2, RET: visit breakpoint"
mouse-face highlight))))))
(gdb-table-add-row table
(list
(bindat-get-field breakpoint 'number)
type
(bindat-get-field breakpoint 'disp)
(let ((flag (bindat-get-field breakpoint 'enabled)))
(if (string-equal flag "y")
(propertize "y" 'font-lock-face font-lock-warning-face)
(propertize "n" 'font-lock-face font-lock-comment-face)))
(bindat-get-field breakpoint 'addr)
(bindat-get-field breakpoint 'times)
(if (string-match ".*watchpoint" type)
(bindat-get-field breakpoint 'what)
(or pending at
(concat "in "
(propertize (or func "unknown")
'font-lock-face font-lock-function-name-face)
(gdb-frame-location breakpoint)))))
;; Add clickable properties only for breakpoints with file:line
;; information
(append (list 'gdb-breakpoint breakpoint)
(when func '(help-echo "mouse-2, RET: visit breakpoint"
mouse-face highlight))))))
(insert (gdb-table-string table " "))
(gdb-place-breakpoints)))
......@@ -2392,7 +2402,7 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
(gdb-remove-breakpoint-icons (point-min) (point-max)))))
(dolist (breakpoint gdb-breakpoints-list)
(let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is
; an associative list
; an associative list
(line (bindat-get-field breakpoint 'line)))
(when line
(let ((file (bindat-get-field breakpoint 'fullname))
......@@ -2414,7 +2424,7 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
(gdb-input
(list "-file-list-exec-source-file"
`(lambda () (gdb-get-location
,bptno ,line ,flag))))))))))
,bptno ,line ,flag))))))))))
(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
......@@ -2425,7 +2435,7 @@ Put in buffer and place breakpoint icon."
(catch 'file-not-found
(if (re-search-forward gdb-source-file-regexp nil t)
(delete (cons bptno "File not found") gdb-location-alist)
(push (cons bptno (match-string 1)) gdb-location-alist)
(push (cons bptno (match-string 1)) gdb-location-alist)
(gdb-resync)
(unless (assoc bptno gdb-location-alist)
(push (cons bptno "File not found") gdb-location-alist)
......@@ -2513,20 +2523,20 @@ If not in a source or disassembly buffer just set point."
(if (get-text-property 0 'gdb-enabled obj)
"-break-disable "
"-break-enable ")
(get-text-property 0 'gdb-bptno obj)))))))))
(get-text-property 0 'gdb-bptno obj)))))))))
(defun gdb-breakpoints-buffer-name ()
(concat "*breakpoints of " (gdb-get-target-string) "*"))
(def-gdb-display-buffer
gdb-display-breakpoints-buffer
'gdb-breakpoints-buffer
"Display status of user-settable breakpoints.")
gdb-display-breakpoints-buffer
'gdb-breakpoints-buffer
"Display status of user-settable breakpoints.")
(def-gdb-frame-for-buffer
gdb-frame-breakpoints-buffer
'gdb-breakpoints-buffer
"Display status of user-settable breakpoints in a new frame.")
gdb-frame-breakpoints-buffer
'gdb-breakpoints-buffer
"Display status of user-settable breakpoints in a new frame.")
(defvar gdb-breakpoints-mode-map
(let ((map (make-sparse-keymap))
......@@ -2543,9 +2553,9 @@ If not in a source or disassembly buffer just set point."
(define-key map "q" 'gdb-delete-frame-or-window)
(define-key map "\r" 'gdb-goto-breakpoint)
(define-key map "\t" (lambda ()
(interactive)
(gdb-set-window-buffer
(gdb-get-buffer-create 'gdb-threads-buffer) t)))
(interactive)
(gdb-set-window-buffer
(gdb-get-buffer-create 'gdb-threads-buffer) t)))
(define-key map [mouse-2] 'gdb-goto-breakpoint)
(define-key map [follow-link] 'mouse-face)
map))
......@@ -2588,14 +2598,14 @@ corresponding to the mode line clicked."
(concat "*threads of " (gdb-get-target-string) "*"))
(def-gdb-display-buffer
gdb-display-threads-buffer
'gdb-threads-buffer
"Display GDB threads.")
gdb-display-threads-buffer
'gdb-threads-buffer
"Display GDB threads.")
(def-gdb-frame-for-buffer
gdb-frame-threads-buffer
'gdb-threads-buffer
"Display GDB threads in a new frame.")
gdb-frame-threads-buffer
'gdb-threads-buffer
"Display GDB threads in a new frame.")
(def-gdb-trigger-and-handler
gdb-invalidate-threads (gdb-current-context-command "-thread-info")
......@@ -2629,18 +2639,20 @@ corresponding to the mode line clicked."
(define-key map "i" 'gdb-interrupt-thread)
(define-key map "c" 'gdb-continue-thread)
(define-key map "s" 'gdb-step-thread)
(define-key map "\t" (lambda ()