aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-08-29 02:23:18 +0000
committerGlenn Morris2009-08-29 02:23:18 +0000
commit2fc50e12d6118293661dd85b7797bb655f8f4a56 (patch)
tree24541786508bc830614e656530b58eb9f4cb8b8b
parent278b354f097e17cd01b82ccb1bceca58681a64f1 (diff)
downloademacs-2fc50e12d6118293661dd85b7797bb655f8f4a56.tar.gz
emacs-2fc50e12d6118293661dd85b7797bb655f8f4a56.zip
Nuke trailing whitespace.
-rw-r--r--lisp/progmodes/gdb-mi.el86
1 files changed, 43 insertions, 43 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index c05c972743e..1ff4aa4e33f 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -103,7 +103,7 @@
103(require 'json) 103(require 'json)
104(require 'bindat) 104(require 'bindat)
105(require 'speedbar) 105(require 'speedbar)
106(eval-when-compile 106(eval-when-compile
107 (require 'cl)) 107 (require 'cl))
108 108
109(defvar tool-bar-map) 109(defvar tool-bar-map)
@@ -264,7 +264,7 @@ Elements are either function names or pairs (buffer . function)")
264 264
265This function checks `gdb-pending-triggers' value every 265This function checks `gdb-pending-triggers' value every
266`gdb-wait-for-pending' seconds." 266`gdb-wait-for-pending' seconds."
267 (run-with-timer 267 (run-with-timer
268 0.5 nil 268 0.5 nil
269 `(lambda () 269 `(lambda ()
270 (if (not gdb-pending-triggers) 270 (if (not gdb-pending-triggers)
@@ -293,7 +293,7 @@ argument (see `gdb-emit-signal')."
293 (dolist (subscriber (gdb-get-subscribers publisher)) 293 (dolist (subscriber (gdb-get-subscribers publisher))
294 (funcall (cdr subscriber) signal))) 294 (funcall (cdr subscriber) signal)))
295 295
296(defvar gdb-buf-publisher '() 296(defvar gdb-buf-publisher '()
297 "Used to invalidate GDB buffers by emitting a signal in 297 "Used to invalidate GDB buffers by emitting a signal in
298`gdb-update'. 298`gdb-update'.
299 299
@@ -315,7 +315,7 @@ valid signal handlers.")
315 "GDB buffers" 315 "GDB buffers"
316 :group 'gdb 316 :group 'gdb
317 :version "23.2") 317 :version "23.2")
318 318
319(defcustom gdb-debug-log-max 128 319(defcustom gdb-debug-log-max 128
320 "Maximum size of `gdb-debug-log'. If nil, size is unlimited." 320 "Maximum size of `gdb-debug-log'. If nil, size is unlimited."
321 :group 'gdb 321 :group 'gdb
@@ -757,7 +757,7 @@ detailed description of this mode.
757 nil t) 757 nil t)
758 758
759 (run-hooks 'gdb-mode-hook)) 759 (run-hooks 'gdb-mode-hook))
760 760
761(defun gdb-init-1 () 761(defun gdb-init-1 ()
762 ;; (re-)initialise 762 ;; (re-)initialise
763 (setq gdb-selected-frame nil 763 (setq gdb-selected-frame nil
@@ -855,7 +855,7 @@ detailed description of this mode.
855 (substring string 0 (- (length string) 1)))) 855 (substring string 0 (- (length string) 1))))
856 (or gud-tooltip-echo-area tooltip-use-echo-area 856 (or gud-tooltip-echo-area tooltip-use-echo-area
857 (not (display-graphic-p))))) 857 (not (display-graphic-p)))))
858 858
859;; If expr is a macro for a function don't print because of possible dangerous 859;; If expr is a macro for a function don't print because of possible dangerous
860;; side-effects. Also printing a function within a tooltip generates an 860;; side-effects. Also printing a function within a tooltip generates an
861;; unexpected starting annotation (phase error). 861;; unexpected starting annotation (phase error).
@@ -1357,14 +1357,14 @@ DOC is an optional documentation string."
1357 (buffer-disable-undo) 1357 (buffer-disable-undo)
1358 ;; Delete buffer from gdb-buf-publisher when it's killed 1358 ;; Delete buffer from gdb-buf-publisher when it's killed
1359 ;; (if it has an associated update trigger) 1359 ;; (if it has an associated update trigger)
1360 (add-hook 1360 (add-hook
1361 'kill-buffer-hook 1361 'kill-buffer-hook
1362 (function 1362 (function
1363 (lambda () 1363 (lambda ()
1364 (let ((trigger (gdb-rules-update-trigger 1364 (let ((trigger (gdb-rules-update-trigger
1365 (gdb-current-buffer-rules)))) 1365 (gdb-current-buffer-rules))))
1366 (when trigger 1366 (when trigger
1367 (gdb-delete-subscriber 1367 (gdb-delete-subscriber
1368 gdb-buf-publisher 1368 gdb-buf-publisher
1369 ;; This should match gdb-add-subscriber done in 1369 ;; This should match gdb-add-subscriber done in
1370 ;; gdb-get-buffer-create 1370 ;; gdb-get-buffer-create
@@ -1614,7 +1614,7 @@ then no --frame option is added."
1614 1614
1615If `gdb-thread-number' is nil, just wrap NAME in asterisks." 1615If `gdb-thread-number' is nil, just wrap NAME in asterisks."
1616 (concat "*" name 1616 (concat "*" name
1617 (if (local-variable-p 'gdb-thread-number) 1617 (if (local-variable-p 'gdb-thread-number)
1618 (format " (bound to thread %s)" gdb-thread-number) 1618 (format " (bound to thread %s)" gdb-thread-number)
1619 "") 1619 "")
1620 "*")) 1620 "*"))
@@ -1648,8 +1648,8 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks."
1648 ;; We may need to update gdb-threads-list so we can use 1648 ;; We may need to update gdb-threads-list so we can use
1649 (gdb-get-buffer-create 'gdb-threads-buffer) 1649 (gdb-get-buffer-create 'gdb-threads-buffer)
1650 ;; gdb-break-list is maintained in breakpoints handler 1650 ;; gdb-break-list is maintained in breakpoints handler
1651 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 1651 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
1652 1652
1653 (gdb-emit-signal gdb-buf-publisher 'update) 1653 (gdb-emit-signal gdb-buf-publisher 'update)
1654 1654
1655 (gdb-get-main-selected-frame) 1655 (gdb-get-main-selected-frame)
@@ -1921,7 +1921,7 @@ current thread and update GDB buffers."
1921 (gdb-setq-thread-number thread-id) 1921 (gdb-setq-thread-number thread-id)
1922 (message (concat "Switched to thread " thread-id))) 1922 (message (concat "Switched to thread " thread-id)))
1923 (message (format "Thread %s stopped" thread-id))))) 1923 (message (format "Thread %s stopped" thread-id)))))
1924 1924
1925 ;; Print "(gdb)" to GUD console 1925 ;; Print "(gdb)" to GUD console
1926 (when gdb-first-done-or-error 1926 (when gdb-first-done-or-error
1927 (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) 1927 (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
@@ -2086,7 +2086,7 @@ FIX-KEY and FIX-KEY work as in `gdb-jsonify-buffer'."
2086 (let ((offset (1+ (- line (line-number-at-pos))))) 2086 (let ((offset (1+ (- line (line-number-at-pos)))))
2087 (cons 2087 (cons
2088 (line-beginning-position offset) 2088 (line-beginning-position offset)
2089 (line-end-position offset)))) 2089 (line-end-position offset))))
2090 2090
2091(defmacro gdb-mark-line (line variable) 2091(defmacro gdb-mark-line (line variable)
2092 "Set VARIABLE marker to point at beginning of LINE. 2092 "Set VARIABLE marker to point at beginning of LINE.
@@ -2109,8 +2109,8 @@ Return position where LINE begins."
2109 2109
2110;; gdb-table struct is a way to programmatically construct simple 2110;; gdb-table struct is a way to programmatically construct simple
2111;; tables. It help to reliably align columns of data in GDB buffers 2111;; tables. It help to reliably align columns of data in GDB buffers
2112;; and provides 2112;; and provides
2113(defstruct 2113(defstruct
2114 gdb-table 2114 gdb-table
2115 (column-sizes nil) 2115 (column-sizes nil)
2116 (rows nil) 2116 (rows nil)
@@ -2269,21 +2269,21 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
2269 gdb-breakpoints-list-handler gdb-breakpoints-list-handler-custom 2269 gdb-breakpoints-list-handler gdb-breakpoints-list-handler-custom
2270 '(start update)) 2270 '(start update))
2271 2271
2272(gdb-set-buffer-rules 2272(gdb-set-buffer-rules
2273 'gdb-breakpoints-buffer 2273 'gdb-breakpoints-buffer
2274 'gdb-breakpoints-buffer-name 2274 'gdb-breakpoints-buffer-name
2275 'gdb-breakpoints-mode 2275 'gdb-breakpoints-mode
2276 'gdb-invalidate-breakpoints) 2276 'gdb-invalidate-breakpoints)
2277 2277
2278(defun gdb-breakpoints-list-handler-custom () 2278(defun gdb-breakpoints-list-handler-custom ()
2279 (let ((breakpoints-list (gdb-get-field 2279 (let ((breakpoints-list (gdb-get-field
2280 (gdb-json-partial-output "bkpt" "script") 2280 (gdb-json-partial-output "bkpt" "script")
2281 'BreakpointTable 'body)) 2281 'BreakpointTable 'body))
2282 (table (make-gdb-table))) 2282 (table (make-gdb-table)))
2283 (setq gdb-breakpoints-list nil) 2283 (setq gdb-breakpoints-list nil)
2284 (gdb-table-add-row table '("Num" "Type" "Disp" "Enb" "Hits" "Addr" "What")) 2284 (gdb-table-add-row table '("Num" "Type" "Disp" "Enb" "Hits" "Addr" "What"))
2285 (dolist (breakpoint breakpoints-list) 2285 (dolist (breakpoint breakpoints-list)
2286 (add-to-list 'gdb-breakpoints-list 2286 (add-to-list 'gdb-breakpoints-list
2287 (cons (gdb-get-field breakpoint 'number) 2287 (cons (gdb-get-field breakpoint 'number)
2288 breakpoint)) 2288 breakpoint))
2289 (let ((at (gdb-get-field breakpoint 'at)) 2289 (let ((at (gdb-get-field breakpoint 'at))
@@ -2474,8 +2474,8 @@ If not in a source or disassembly buffer just set point."
2474 ;; Don't bind "q" to kill-this-buffer as we need it for breakpoint icons. 2474 ;; Don't bind "q" to kill-this-buffer as we need it for breakpoint icons.
2475 (define-key map "q" 'gdb-delete-frame-or-window) 2475 (define-key map "q" 'gdb-delete-frame-or-window)
2476 (define-key map "\r" 'gdb-goto-breakpoint) 2476 (define-key map "\r" 'gdb-goto-breakpoint)
2477 (define-key map "\t" '(lambda () 2477 (define-key map "\t" '(lambda ()
2478 (interactive) 2478 (interactive)
2479 (gdb-set-window-buffer 2479 (gdb-set-window-buffer
2480 (gdb-get-buffer-create 'gdb-threads-buffer) t))) 2480 (gdb-get-buffer-create 'gdb-threads-buffer) t)))
2481 (define-key map [mouse-2] 'gdb-goto-breakpoint) 2481 (define-key map [mouse-2] 'gdb-goto-breakpoint)
@@ -2500,7 +2500,7 @@ corresponding to the mode line clicked."
2500 2500
2501(defmacro gdb-propertize-header (name buffer help-echo mouse-face face) 2501(defmacro gdb-propertize-header (name buffer help-echo mouse-face face)
2502 `(propertize ,name 2502 `(propertize ,name
2503 'help-echo ,help-echo 2503 'help-echo ,help-echo
2504 'mouse-face ',mouse-face 2504 'mouse-face ',mouse-face
2505 'face ',face 2505 'face ',face
2506 'local-map 2506 'local-map
@@ -2509,7 +2509,7 @@ corresponding to the mode line clicked."
2509 (lambda (event) (interactive "e") 2509 (lambda (event) (interactive "e")
2510 (save-selected-window 2510 (save-selected-window
2511 (select-window (posn-window (event-start event))) 2511 (select-window (posn-window (event-start event)))
2512 (gdb-set-window-buffer 2512 (gdb-set-window-buffer
2513 (gdb-get-buffer-create ',buffer) t) ))))) 2513 (gdb-get-buffer-create ',buffer) t) )))))
2514 2514
2515 2515
@@ -2535,7 +2535,7 @@ corresponding to the mode line clicked."
2535 '(start update update-threads)) 2535 '(start update update-threads))
2536 2536
2537(gdb-set-buffer-rules 2537(gdb-set-buffer-rules
2538 'gdb-threads-buffer 2538 'gdb-threads-buffer
2539 'gdb-threads-buffer-name 2539 'gdb-threads-buffer-name
2540 'gdb-threads-mode 2540 'gdb-threads-mode
2541 'gdb-invalidate-threads) 2541 'gdb-invalidate-threads)
@@ -2561,9 +2561,9 @@ corresponding to the mode line clicked."
2561 (define-key map "i" 'gdb-interrupt-thread) 2561 (define-key map "i" 'gdb-interrupt-thread)
2562 (define-key map "c" 'gdb-continue-thread) 2562 (define-key map "c" 'gdb-continue-thread)
2563 (define-key map "s" 'gdb-step-thread) 2563 (define-key map "s" 'gdb-step-thread)
2564 (define-key map "\t" '(lambda () 2564 (define-key map "\t" '(lambda ()
2565 (interactive) 2565 (interactive)
2566 (gdb-set-window-buffer 2566 (gdb-set-window-buffer
2567 (gdb-get-buffer-create 'gdb-breakpoints-buffer) t))) 2567 (gdb-get-buffer-create 'gdb-breakpoints-buffer) t)))
2568 (define-key map [mouse-2] 'gdb-select-thread) 2568 (define-key map [mouse-2] 'gdb-select-thread)
2569 (define-key map [follow-link] 'mouse-face) 2569 (define-key map [follow-link] 'mouse-face)
@@ -2625,7 +2625,7 @@ corresponding to the mode line clicked."
2625 (mapconcat 2625 (mapconcat
2626 (lambda (arg) 2626 (lambda (arg)
2627 (apply 'format `("%s=%s" ,@(gdb-get-many-fields arg 'name 'value)))) 2627 (apply 'format `("%s=%s" ,@(gdb-get-many-fields arg 'name 'value))))
2628 args ",")) 2628 args ","))
2629 ")") 2629 ")")
2630 "") 2630 "")
2631 (if gdb-thread-buffer-locations 2631 (if gdb-thread-buffer-locations
@@ -2786,7 +2786,7 @@ line."
2786 2786
2787(def-gdb-trigger-and-handler 2787(def-gdb-trigger-and-handler
2788 gdb-invalidate-memory 2788 gdb-invalidate-memory
2789 (format "-data-read-memory %s %s %d %d %d" 2789 (format "-data-read-memory %s %s %d %d %d"
2790 gdb-memory-address 2790 gdb-memory-address
2791 gdb-memory-format 2791 gdb-memory-format
2792 gdb-memory-unit 2792 gdb-memory-unit
@@ -3136,7 +3136,7 @@ DOC is an optional documentation string."
3136 (special-display-frame-alist 3136 (special-display-frame-alist
3137 `((left-fringe . 0) 3137 `((left-fringe . 0)
3138 (right-fringe . 0) 3138 (right-fringe . 0)
3139 (width . 83) 3139 (width . 83)
3140 ,@gdb-frame-parameters))) 3140 ,@gdb-frame-parameters)))
3141 (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer)))) 3141 (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer))))
3142 3142
@@ -3248,7 +3248,7 @@ DOC is an optional documentation string."
3248 (set-window-point window (gdb-mark-line marked-line gdb-disassembly-position)))) 3248 (set-window-point window (gdb-mark-line marked-line gdb-disassembly-position))))
3249 (setq mode-name 3249 (setq mode-name
3250 (gdb-current-context-mode-name 3250 (gdb-current-context-mode-name
3251 (concat "Disassembly: " 3251 (concat "Disassembly: "
3252 (gdb-get-field (gdb-current-buffer-frame) 'func)))))) 3252 (gdb-get-field (gdb-current-buffer-frame) 'func))))))
3253 3253
3254(defun gdb-disassembly-place-breakpoints () 3254(defun gdb-disassembly-place-breakpoints ()
@@ -3304,7 +3304,7 @@ DOC is an optional documentation string."
3304 (if breakpoint 3304 (if breakpoint
3305 (gud-basic-call (concat "-break-delete " (gdb-get-field breakpoint 'number))) 3305 (gud-basic-call (concat "-break-delete " (gdb-get-field breakpoint 'number)))
3306 (error "Not recognized as break/watchpoint line"))))) 3306 (error "Not recognized as break/watchpoint line")))))
3307 3307
3308(defun gdb-goto-breakpoint (&optional event) 3308(defun gdb-goto-breakpoint (&optional event)
3309 "Go to the location of breakpoint at current line of 3309 "Go to the location of breakpoint at current line of
3310breakpoints buffer." 3310breakpoints buffer."
@@ -3369,9 +3369,9 @@ member."
3369 "in" 3369 "in"
3370 (concat 3370 (concat
3371 (gdb-get-field frame 'func) 3371 (gdb-get-field frame 'func)
3372 (if gdb-stack-buffer-locations 3372 (if gdb-stack-buffer-locations
3373 (gdb-frame-location frame) "") 3373 (gdb-frame-location frame) "")
3374 (if gdb-stack-buffer-addresses 3374 (if gdb-stack-buffer-addresses
3375 (concat " at " (gdb-get-field frame 'addr)) ""))) 3375 (concat " at " (gdb-get-field frame 'addr)) "")))
3376 `(mouse-face highlight 3376 `(mouse-face highlight
3377 help-echo "mouse-2, RET: Select frame" 3377 help-echo "mouse-2, RET: Select frame"
@@ -3505,8 +3505,8 @@ member."
3505 help-echo "mouse-2: edit value" 3505 help-echo "mouse-2: edit value"
3506 local-map ,gdb-edit-locals-map-1) 3506 local-map ,gdb-edit-locals-map-1)
3507 value)) 3507 value))
3508 (gdb-table-add-row 3508 (gdb-table-add-row
3509 table 3509 table
3510 (list 3510 (list
3511 (propertize type 'font-lock-face font-lock-type-face) 3511 (propertize type 'font-lock-face font-lock-type-face)
3512 (propertize name 'font-lock-face font-lock-variable-name-face) 3512 (propertize name 'font-lock-face font-lock-variable-name-face)
@@ -3529,8 +3529,8 @@ member."
3529 (let ((map (make-sparse-keymap))) 3529 (let ((map (make-sparse-keymap)))
3530 (suppress-keymap map) 3530 (suppress-keymap map)
3531 (define-key map "q" 'kill-this-buffer) 3531 (define-key map "q" 'kill-this-buffer)
3532 (define-key map "\t" '(lambda () 3532 (define-key map "\t" '(lambda ()
3533 (interactive) 3533 (interactive)
3534 (gdb-set-window-buffer 3534 (gdb-set-window-buffer
3535 (gdb-get-buffer-create 3535 (gdb-get-buffer-create
3536 'gdb-registers-buffer 3536 'gdb-registers-buffer
@@ -3586,7 +3586,7 @@ member."
3586 (dolist (register register-values) 3586 (dolist (register register-values)
3587 (let* ((register-number (gdb-get-field register 'number)) 3587 (let* ((register-number (gdb-get-field register 'number))
3588 (value (gdb-get-field register 'value)) 3588 (value (gdb-get-field register 'value))
3589 (register-name (nth (string-to-number register-number) 3589 (register-name (nth (string-to-number register-number)
3590 gdb-register-names))) 3590 gdb-register-names)))
3591 (gdb-table-add-row 3591 (gdb-table-add-row
3592 table 3592 table
@@ -3620,8 +3620,8 @@ member."
3620 (define-key map "\r" 'gdb-edit-register-value) 3620 (define-key map "\r" 'gdb-edit-register-value)
3621 (define-key map [mouse-2] 'gdb-edit-register-value) 3621 (define-key map [mouse-2] 'gdb-edit-register-value)
3622 (define-key map "q" 'kill-this-buffer) 3622 (define-key map "q" 'kill-this-buffer)
3623 (define-key map "\t" '(lambda () 3623 (define-key map "\t" '(lambda ()
3624 (interactive) 3624 (interactive)
3625 (gdb-set-window-buffer 3625 (gdb-set-window-buffer
3626 (gdb-get-buffer-create 3626 (gdb-get-buffer-create
3627 'gdb-locals-buffer 3627 'gdb-locals-buffer
@@ -3736,7 +3736,7 @@ overlay arrow in source buffer."
3736 '((overlay-arrow . hollow-right-triangle)))) 3736 '((overlay-arrow . hollow-right-triangle))))
3737 (setq gud-overlay-arrow-position (make-marker)) 3737 (setq gud-overlay-arrow-position (make-marker))
3738 (set-marker gud-overlay-arrow-position position)))))))) 3738 (set-marker gud-overlay-arrow-position position))))))))
3739 3739
3740(defvar gdb-prompt-name-regexp "value=\"\\(.*?\\)\"") 3740(defvar gdb-prompt-name-regexp "value=\"\\(.*?\\)\"")
3741 3741
3742(defun gdb-get-prompt () 3742(defun gdb-get-prompt ()
@@ -3794,7 +3794,7 @@ SPLIT-HORIZONTAL and show BUF in the new window."
3794 (eq buf-type 3794 (eq buf-type
3795 (gdb-buffer-type (window-buffer w))))))) 3795 (gdb-buffer-type (window-buffer w)))))))
3796 (if dedicated-window 3796 (if dedicated-window
3797 (set-window-buffer 3797 (set-window-buffer
3798 (split-window dedicated-window nil split-horizontal) buf) 3798 (split-window dedicated-window nil split-horizontal) buf)
3799 (gdb-display-buffer buf t)))))) 3799 (gdb-display-buffer buf t))))))
3800 (error "Null buffer"))) 3800 (error "Null buffer")))