changeset 63031:ae951edf75a6

(gdb, gud-menu-map): Add command to evaluate C dereferenced pointer expression. (gud-tool-bar-map): Put it on the tool bar.
author Nick Roberts <nickrob@snap.net.nz>
date Sun, 05 Jun 2005 07:50:53 +0000
parents ca0a6ccac710
children e0a00e4eda52
files lisp/progmodes/gud.el
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gud.el	Sun Jun 05 07:50:04 2005 +0000
+++ b/lisp/progmodes/gud.el	Sun Jun 05 07:50:53 2005 +0000
@@ -140,6 +140,9 @@
 		  :enable (and (not gud-running)
 			       (memq gud-minor-mode
 				     '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
+    ([print*]	menu-item "Print Dereference" gud-pstar
+                     :enable (and (not gud-running)
+				  (memq gud-minor-mode '(gdbmi gdba gdb))))
     ([print]	menu-item "Print Expression" gud-print
                      :enable (not gud-running))
     ([watch]	menu-item "Watch Expression" gud-watch
@@ -183,18 +186,19 @@
 	(dolist (x '((gud-break . "gud-break")
 		     (gud-remove . "gud-remove")
 		     (gud-print . "gud-print")
+		     (gud-pstar . "gud-pstar")
 		     (gud-watch . "gud-watch")
+		     (gud-cont . "gud-cont")
+		     (gud-until . "gud-until")
+		     (gud-finish . "gud-finish")
 		     (gud-run . "gud-run")
-		     (gud-until . "gud-until")
-		     (gud-cont . "gud-cont")
 		     ;; gud-s, gud-si etc. instead of gud-step,
 		     ;; gud-stepi, to avoid file-name clashes on DOS
 		     ;; 8+3 filesystems.
+		     (gud-next . "gud-n")
 		     (gud-step . "gud-s")
-		     (gud-next . "gud-n")
-		     (gud-finish . "gud-finish")
+		     (gud-nexti . "gud-ni")
 		     (gud-stepi . "gud-si")
-		     (gud-nexti . "gud-ni")
 		     (gud-up . "gud-up")
 		     (gud-down . "gud-down")
 		     (gud-goto-info . "info"))
@@ -580,6 +584,8 @@
   (gud-def gud-up     "up %p"        "<" "Up N stack frames (numeric arg).")
   (gud-def gud-down   "down %p"      ">" "Down N stack frames (numeric arg).")
   (gud-def gud-print  "print %e"     "\C-p" "Evaluate C expression at point.")
+  (gud-def gud-pstar  "print* %e"    nil
+	   "Evaluate C dereferenced pointer expression at point.")
   (gud-def gud-until  "until %l"     "\C-u" "Continue to current line.")
   (gud-def gud-run    "run"	     nil    "Run the program.")