comparison lisp/gud.el @ 25601:5a25ec8539c4

(gud-make-debug-menu): Make a child for the local menu, for its menu bar, and the debug menu. (gdb, sdb, dbx, xdb, perldb, pdb, jdb): Use the history for arg-reading in the simple way.
author Richard M. Stallman <rms@gnu.org>
date Wed, 08 Sep 1999 05:17:05 +0000
parents 2abcb92cf0ae
children b1d85e2a1cae
comparison
equal deleted inserted replaced
25600:6cea4c28fc1c 25601:5a25ec8539c4
358 (list (read-from-minibuffer "Run gdb (like this): " 358 (list (read-from-minibuffer "Run gdb (like this): "
359 (if (consp gud-gdb-history) 359 (if (consp gud-gdb-history)
360 (car gud-gdb-history) 360 (car gud-gdb-history)
361 "gdb ") 361 "gdb ")
362 gdb-minibuffer-local-map nil 362 gdb-minibuffer-local-map nil
363 '(gud-gdb-history . 1)))) 363 'gud-gdb-history)))
364 364
365 (gud-common-init command-line 'gud-gdb-massage-args 365 (gud-common-init command-line 'gud-gdb-massage-args
366 'gud-gdb-marker-filter 'gud-gdb-find-file) 366 'gud-gdb-marker-filter 'gud-gdb-find-file)
367 367
368 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") 368 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
668 (list (read-from-minibuffer "Run sdb (like this): " 668 (list (read-from-minibuffer "Run sdb (like this): "
669 (if (consp gud-sdb-history) 669 (if (consp gud-sdb-history)
670 (car gud-sdb-history) 670 (car gud-sdb-history)
671 "sdb ") 671 "sdb ")
672 nil nil 672 nil nil
673 '(gud-sdb-history . 1)))) 673 'gud-sdb-history)))
674 (if (and gud-sdb-needs-tags 674 (if (and gud-sdb-needs-tags
675 (not (and (boundp 'tags-file-name) 675 (not (and (boundp 'tags-file-name)
676 (stringp tags-file-name) 676 (stringp tags-file-name)
677 (file-exists-p tags-file-name)))) 677 (file-exists-p tags-file-name))))
678 (error "The sdb support requires a valid tags table to work.")) 678 (error "The sdb support requires a valid tags table to work."))
1002 (list (read-from-minibuffer "Run dbx (like this): " 1002 (list (read-from-minibuffer "Run dbx (like this): "
1003 (if (consp gud-dbx-history) 1003 (if (consp gud-dbx-history)
1004 (car gud-dbx-history) 1004 (car gud-dbx-history)
1005 "dbx ") 1005 "dbx ")
1006 nil nil 1006 nil nil
1007 '(gud-dbx-history . 1)))) 1007 'gud-dbx-history)))
1008 1008
1009 (cond 1009 (cond
1010 (gud-mips-p 1010 (gud-mips-p
1011 (gud-common-init command-line 'gud-mipsdbx-massage-args 1011 (gud-common-init command-line 'gud-mipsdbx-massage-args
1012 'gud-mipsdbx-marker-filter 'gud-dbx-find-file)) 1012 'gud-mipsdbx-marker-filter 'gud-dbx-find-file))
1151 (list (read-from-minibuffer "Run xdb (like this): " 1151 (list (read-from-minibuffer "Run xdb (like this): "
1152 (if (consp gud-xdb-history) 1152 (if (consp gud-xdb-history)
1153 (car gud-xdb-history) 1153 (car gud-xdb-history)
1154 "xdb ") 1154 "xdb ")
1155 nil nil 1155 nil nil
1156 '(gud-xdb-history . 1)))) 1156 'gud-xdb-history)))
1157 1157
1158 (gud-common-init command-line 'gud-xdb-massage-args 1158 (gud-common-init command-line 'gud-xdb-massage-args
1159 'gud-xdb-marker-filter 'gud-xdb-find-file) 1159 'gud-xdb-marker-filter 'gud-xdb-find-file)
1160 1160
1161 (gud-def gud-break "b %f:%l" "\C-b" "Set breakpoint at current line.") 1161 (gud-def gud-break "b %f:%l" "\C-b" "Set breakpoint at current line.")
1268 " " 1268 " "
1269 (or (buffer-file-name) 1269 (or (buffer-file-name)
1270 "-e 0") 1270 "-e 0")
1271 " ")) 1271 " "))
1272 nil nil 1272 nil nil
1273 '(gud-perldb-history . 1)))) 1273 'gud-perldb-history)))
1274 1274
1275 (gud-common-init command-line 'gud-perldb-massage-args 1275 (gud-common-init command-line 'gud-perldb-massage-args
1276 'gud-perldb-marker-filter 'gud-perldb-find-file) 1276 'gud-perldb-marker-filter 'gud-perldb-find-file)
1277 1277
1278 (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") 1278 (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.")
1397 (list (read-from-minibuffer "Run pdb (like this): " 1397 (list (read-from-minibuffer "Run pdb (like this): "
1398 (if (consp gud-pdb-history) 1398 (if (consp gud-pdb-history)
1399 (car gud-pdb-history) 1399 (car gud-pdb-history)
1400 (concat gud-pdb-command-name " ")) 1400 (concat gud-pdb-command-name " "))
1401 pdb-minibuffer-local-map nil 1401 pdb-minibuffer-local-map nil
1402 '(gud-pdb-history . 1)))) 1402 'gud-pdb-history)))
1403 1403
1404 (gud-common-init command-line 'gud-pdb-massage-args 1404 (gud-common-init command-line 'gud-pdb-massage-args
1405 'gud-pdb-marker-filter 'gud-pdb-find-file) 1405 'gud-pdb-marker-filter 'gud-pdb-find-file)
1406 1406
1407 (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.") 1407 (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
1874 (list (read-from-minibuffer "Run jdb (like this): " 1874 (list (read-from-minibuffer "Run jdb (like this): "
1875 (if (consp gud-jdb-history) 1875 (if (consp gud-jdb-history)
1876 (car gud-jdb-history) 1876 (car gud-jdb-history)
1877 (concat gud-jdb-command-name " ")) 1877 (concat gud-jdb-command-name " "))
1878 nil nil 1878 nil nil
1879 '(gud-jdb-history . 1)))) 1879 'gud-jdb-history)))
1880 1880
1881 (gud-common-init command-line 'gud-jdb-massage-args 1881 (gud-common-init command-line 'gud-jdb-massage-args
1882 'gud-jdb-marker-filter 'gud-jdb-find-file) 1882 'gud-jdb-marker-filter 'gud-jdb-find-file)
1883 1883
1884 (gud-def gud-break "stop at %F:%l" "\C-b" "Set breakpoint at current line.") 1884 (gud-def gud-break "stop at %F:%l" "\C-b" "Set breakpoint at current line.")
2363 2363
2364 (defun gud-make-debug-menu () 2364 (defun gud-make-debug-menu ()
2365 "Make sure the current local map has a [menu-bar debug] submap. 2365 "Make sure the current local map has a [menu-bar debug] submap.
2366 If it doesn't, replace it with a new map that inherits it, 2366 If it doesn't, replace it with a new map that inherits it,
2367 and create such a submap in that new map." 2367 and create such a submap in that new map."
2368 (if (and (current-local-map) 2368 (use-local-map (gud-new-keymap (current-local-map)))
2369 (lookup-key (current-local-map) [menu-bar debug])) 2369 (define-key (current-local-map) [menu-bar]
2370 nil 2370 (gud-new-keymap (lookup-key (current-local-map) [menu-bar])))
2371 (use-local-map (gud-new-keymap (current-local-map))) 2371 (define-key (current-local-map) [menu-bar debug]
2372 (define-key (current-local-map) [menu-bar debug] 2372 (cons "Gud" (gud-new-keymap gud-menu-map))))
2373 (cons "Gud" (gud-new-keymap gud-menu-map)))))
2374 2373
2375 ;;; Code for parsing expressions out of C code. The single entry point is 2374 ;;; Code for parsing expressions out of C code. The single entry point is
2376 ;;; find-c-expr, which tries to return an lvalue expression from around point. 2375 ;;; find-c-expr, which tries to return an lvalue expression from around point.
2377 ;;; 2376 ;;;
2378 ;;; The rest of this file is a hacked version of gdbsrc.el by 2377 ;;; The rest of this file is a hacked version of gdbsrc.el by