aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-04-26 21:25:55 +0000
committerNick Roberts2005-04-26 21:25:55 +0000
commita00917788e00e916dda9bbf126065efaf807009e (patch)
treebc350f8006cbd21dafdd0b9daed6d26549bd71dc
parent19475957517e18982da4c17363c3717a79bd08ee (diff)
downloademacs-a00917788e00e916dda9bbf126065efaf807009e.tar.gz
emacs-a00917788e00e916dda9bbf126065efaf807009e.zip
(gdb-location-alist): Rename from
gdb-location-list. Break lines that are over 80 characters wide.
-rw-r--r--lisp/progmodes/gdb-ui.el58
1 files changed, 35 insertions, 23 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 95920ff9f02..f0de784c252 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -79,7 +79,8 @@
79(defvar gdb-overlay-arrow-position nil) 79(defvar gdb-overlay-arrow-position nil)
80(defvar gdb-server-prefix nil) 80(defvar gdb-server-prefix nil)
81(defvar gdb-flush-pending-output nil) 81(defvar gdb-flush-pending-output nil)
82(defvar gdb-location-list nil "Alist of breakpoint numbers and full filenames.") 82(defvar gdb-location-alist nil
83 "Alist of breakpoint numbers and full filenames.")
83(defvar gdb-find-file-unhook nil) 84(defvar gdb-find-file-unhook nil)
84 85
85(defvar gdb-buffer-type nil 86(defvar gdb-buffer-type nil
@@ -281,7 +282,7 @@ detailed description of this mode.
281 (setq gdb-output-sink 'user) 282 (setq gdb-output-sink 'user)
282 (setq gdb-server-prefix "server ") 283 (setq gdb-server-prefix "server ")
283 (setq gdb-flush-pending-output nil) 284 (setq gdb-flush-pending-output nil)
284 (setq gdb-location-list nil) 285 (setq gdb-location-alist nil)
285 (setq gdb-find-file-unhook nil) 286 (setq gdb-find-file-unhook nil)
286 ;; 287 ;;
287 (setq gdb-buffer-type 'gdba) 288 (setq gdb-buffer-type 'gdba)
@@ -301,7 +302,7 @@ detailed description of this mode.
301 (run-hooks 'gdba-mode-hook)) 302 (run-hooks 'gdba-mode-hook))
302 303
303(defcustom gdb-use-colon-colon-notation nil 304(defcustom gdb-use-colon-colon-notation nil
304 "If non-nil use FUN::VAR format to display variables in the speedbar." ; 305 "If non-nil use FUN::VAR format to display variables in the speedbar."
305 :type 'boolean 306 :type 'boolean
306 :group 'gud 307 :group 'gud
307 :version "22.1") 308 :version "22.1")
@@ -430,7 +431,8 @@ detailed description of this mode.
430 (let ((varnum (match-string 1))) 431 (let ((varnum (match-string 1)))
431 (gdb-enqueue-input 432 (gdb-enqueue-input
432 (list 433 (list
433 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 434 (if (with-current-buffer gud-comint-buffer
435 (eq gud-minor-mode 'gdba))
434 (concat "server interpreter mi \"-var-evaluate-expression " 436 (concat "server interpreter mi \"-var-evaluate-expression "
435 varnum "\"\n") 437 varnum "\"\n")
436 (concat "-var-evaluate-expression " varnum "\n")) 438 (concat "-var-evaluate-expression " varnum "\n"))
@@ -482,7 +484,8 @@ detailed description of this mode.
482 (list 484 (list
483 (if (with-current-buffer gud-comint-buffer 485 (if (with-current-buffer gud-comint-buffer
484 (eq gud-minor-mode 'gdba)) 486 (eq gud-minor-mode 'gdba))
485 (concat "server interpreter mi \"-var-assign " varnum " " value "\"\n") 487 (concat "server interpreter mi \"-var-assign "
488 varnum " " value "\"\n")
486 (concat "-var-assign " varnum " " value "\n")) 489 (concat "-var-assign " varnum " " value "\n"))
487 'ignore)))) 490 'ignore))))
488 491
@@ -981,7 +984,8 @@ happens to be appropriate."
981 (match-beginning 0)))) 984 (match-beginning 0))))
982 ;; 985 ;;
983 ;; Everything after, we save, to combine with later input. 986 ;; Everything after, we save, to combine with later input.
984 (setq gud-marker-acc (substring gud-marker-acc (match-beginning 0)))) 987 (setq gud-marker-acc (substring gud-marker-acc
988 (match-beginning 0))))
985 ;; 989 ;;
986 ;; In case we know the gud-marker-acc contains no partial annotations: 990 ;; In case we know the gud-marker-acc contains no partial annotations:
987 (progn 991 (progn
@@ -1045,7 +1049,7 @@ happens to be appropriate."
1045;; annotation rule binding of whatever gdb sends to tell us this command 1049;; annotation rule binding of whatever gdb sends to tell us this command
1046;; might have changed it's output. 1050;; might have changed it's output.
1047;; 1051;;
1048;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. 1052;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed.
1049;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the 1053;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the
1050;; input in the input queue (see comment about ``gdb communications'' above). 1054;; input in the input queue (see comment about ``gdb communications'' above).
1051 1055
@@ -1077,8 +1081,9 @@ happens to be appropriate."
1077 ;; put customisation here 1081 ;; put customisation here
1078 (,custom-defun))) 1082 (,custom-defun)))
1079 1083
1080(defmacro def-gdb-auto-updated-buffer (buffer-key trigger-name gdb-command 1084(defmacro def-gdb-auto-updated-buffer (buffer-key
1081 output-handler-name custom-defun) 1085 trigger-name gdb-command
1086 output-handler-name custom-defun)
1082 `(progn 1087 `(progn
1083 (def-gdb-auto-update-trigger ,trigger-name 1088 (def-gdb-auto-update-trigger ,trigger-name
1084 ;; The demand predicate: 1089 ;; The demand predicate:
@@ -1225,7 +1230,7 @@ static char *magick[] = {
1225 '(mouse-face highlight 1230 '(mouse-face highlight
1226 help-echo "mouse-2, RET: visit breakpoint")) 1231 help-echo "mouse-2, RET: visit breakpoint"))
1227 (unless (file-exists-p file) 1232 (unless (file-exists-p file)
1228 (setq file (cdr (assoc bptno gdb-location-list)))) 1233 (setq file (cdr (assoc bptno gdb-location-alist))))
1229 (unless (string-equal file "File not found") 1234 (unless (string-equal file "File not found")
1230 (if file 1235 (if file
1231 (with-current-buffer (find-file-noselect file) 1236 (with-current-buffer (find-file-noselect file)
@@ -1233,13 +1238,15 @@ static char *magick[] = {
1233 'gdba) 1238 'gdba)
1234 (set (make-local-variable 'tool-bar-map) 1239 (set (make-local-variable 'tool-bar-map)
1235 gud-tool-bar-map) 1240 gud-tool-bar-map)
1236 ;; only want one breakpoint icon at each location 1241 ;; only want one breakpoint icon at each
1242 ;; location
1237 (save-excursion 1243 (save-excursion
1238 (goto-line (string-to-number line)) 1244 (goto-line (string-to-number line))
1239 (gdb-put-breakpoint-icon (eq flag ?y) bptno))) 1245 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
1240 (gdb-enqueue-input 1246 (gdb-enqueue-input
1241 (list (concat "list " 1247 (list
1242 (match-string-no-properties 1) ":1\n") 1248 (concat "list "
1249 (match-string-no-properties 1) ":1\n")
1243 'ignore)) 1250 'ignore))
1244 (gdb-enqueue-input 1251 (gdb-enqueue-input
1245 (list "info source\n" 1252 (list "info source\n"
@@ -1351,7 +1358,7 @@ static char *magick[] = {
1351 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1358 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1352 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") 1359 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
1353 (looking-at 1360 (looking-at
1354 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) 1361 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
1355 (gdb-enqueue-input 1362 (gdb-enqueue-input
1356 (list 1363 (list
1357 (concat gdb-server-prefix 1364 (concat gdb-server-prefix
@@ -1383,14 +1390,15 @@ static char *magick[] = {
1383 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1390 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1384 (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") 1391 (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
1385 (looking-at 1392 (looking-at
1386 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)")) 1393 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\
1394\\(\\S-*\\):\\([0-9]+\\)"))
1387 (let ((bptno (match-string 1)) 1395 (let ((bptno (match-string 1))
1388 (file (match-string 2)) 1396 (file (match-string 2))
1389 (line (match-string 3))) 1397 (line (match-string 3)))
1390 (save-selected-window 1398 (save-selected-window
1391 (let* ((buf (find-file-noselect 1399 (let* ((buf (find-file-noselect
1392 (if (file-exists-p file) file 1400 (if (file-exists-p file) file
1393 (cdr (assoc bptno gdb-location-list))))) 1401 (cdr (assoc bptno gdb-location-alist)))))
1394 (window (display-buffer buf))) 1402 (window (display-buffer buf)))
1395 (with-current-buffer buf 1403 (with-current-buffer buf
1396 (goto-line (string-to-number line)) 1404 (goto-line (string-to-number line))
@@ -1481,7 +1489,8 @@ static char *magick[] = {
1481 (interactive (list last-input-event)) 1489 (interactive (list last-input-event))
1482 (if event (mouse-set-point event)) 1490 (if event (mouse-set-point event))
1483 (gdb-enqueue-input 1491 (gdb-enqueue-input
1484 (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) 1492 (list (concat gdb-server-prefix "frame "
1493 (gdb-get-frame-number) "\n") 'ignore))
1485 (gud-display-frame)) 1494 (gud-display-frame))
1486 1495
1487 1496
@@ -1987,7 +1996,8 @@ corresponding to the mode line clicked."
1987 :enable gdb-use-inferior-io-buffer)) 1996 :enable gdb-use-inferior-io-buffer))
1988 (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) 1997 (define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
1989 (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) 1998 (define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
1990 (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))) 1999 (define-key menu [breakpoints]
2000 '("Breakpoints" . gdb-display-breakpoints-buffer)))
1991 2001
1992(let ((menu (make-sparse-keymap "GDB-Frames"))) 2002(let ((menu (make-sparse-keymap "GDB-Frames")))
1993 (define-key gud-menu-map [frames] 2003 (define-key gud-menu-map [frames]
@@ -2002,7 +2012,8 @@ corresponding to the mode line clicked."
2002 :enable gdb-use-inferior-io-buffer)) 2012 :enable gdb-use-inferior-io-buffer))
2003 (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) 2013 (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
2004 (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) 2014 (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
2005 (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))) 2015 (define-key menu [breakpoints]
2016 '("Breakpoints" . gdb-frame-breakpoints-buffer)))
2006 2017
2007(let ((menu (make-sparse-keymap "GDB-UI"))) 2018(let ((menu (make-sparse-keymap "GDB-UI")))
2008 (define-key gud-menu-map [ui] 2019 (define-key gud-menu-map [ui]
@@ -2157,9 +2168,9 @@ Put in buffer and place breakpoint icon."
2157 (catch 'file-not-found 2168 (catch 'file-not-found
2158 (if (search-forward "Located in " nil t) 2169 (if (search-forward "Located in " nil t)
2159 (if (looking-at "\\S-*") 2170 (if (looking-at "\\S-*")
2160 (push (cons bptno (match-string 0)) gdb-location-list)) 2171 (push (cons bptno (match-string 0)) gdb-location-alist))
2161 (gdb-resync) 2172 (gdb-resync)
2162 (push (cons bptno "File not found") gdb-location-list) 2173 (push (cons bptno "File not found") gdb-location-alist)
2163 (message-box "Cannot find source file for breakpoint location.\n\ 2174 (message-box "Cannot find source file for breakpoint location.\n\
2164Add directory to search path for source files using the GDB command, dir.") 2175Add directory to search path for source files using the GDB command, dir.")
2165 (throw 'file-not-found nil)) 2176 (throw 'file-not-found nil))
@@ -2214,7 +2225,7 @@ BUFFER nil or omitted means use the current buffer."
2214 (unless buffer 2225 (unless buffer
2215 (setq buffer (current-buffer))) 2226 (setq buffer (current-buffer)))
2216 (dolist (overlay (overlays-in start end)) 2227 (dolist (overlay (overlays-in start end))
2217 (when (overlay-get overlay 'put-break) 2228 (when (overlay-get overlay 'put-break)
2218 (delete-overlay overlay)))) 2229 (delete-overlay overlay))))
2219 2230
2220(defun gdb-put-breakpoint-icon (enabled bptno) 2231(defun gdb-put-breakpoint-icon (enabled bptno)
@@ -2416,7 +2427,8 @@ BUFFER nil or omitted means use the current buffer."
2416 (setq gdb-input-queue 2427 (setq gdb-input-queue
2417 (delete item gdb-input-queue)))))) 2428 (delete item gdb-input-queue))))))
2418 (gdb-enqueue-input 2429 (gdb-enqueue-input
2419 (list (concat gdb-server-prefix "disassemble " gdb-current-address "\n") 2430 (list (concat gdb-server-prefix "disassemble "
2431 gdb-current-address "\n")
2420 'gdb-assembler-handler)) 2432 'gdb-assembler-handler))
2421 (push 'gdb-invalidate-assembler gdb-pending-triggers) 2433 (push 'gdb-invalidate-assembler gdb-pending-triggers)
2422 (setq gdb-previous-address gdb-current-address) 2434 (setq gdb-previous-address gdb-current-address)