aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-11-09 23:13:56 +0000
committerKim F. Storm2005-11-09 23:13:56 +0000
commit1609a9633f98795e6f5feb69a6a9b37dfac5d2b0 (patch)
treeccc109e8a6ea84f8eb5fdb61baf802c7f67c0ffd /src
parent9c797a34f5551dad3cefe798f3518de47bdd78e8 (diff)
downloademacs-1609a9633f98795e6f5feb69a6a9b37dfac5d2b0.tar.gz
emacs-1609a9633f98795e6f5feb69a6a9b37dfac5d2b0.zip
(pp, pp1): Use safe_debug_print.
(pv, pv1): New commands to print value of a lisp variable.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 94169be7895..cb1deddb1ea 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -66,7 +66,7 @@ end
66# Print out s-expressions 66# Print out s-expressions
67define pp 67define pp
68 set $tmp = $arg0 68 set $tmp = $arg0
69 set debug_print ($tmp) 69 set safe_debug_print ($tmp)
70end 70end
71document pp 71document pp
72Print the argument as an emacs s-expression 72Print the argument as an emacs s-expression
@@ -78,7 +78,7 @@ define pp1
78 set $tmp = $arg0 78 set $tmp = $arg0
79 echo $arg0 79 echo $arg0
80 printf " = " 80 printf " = "
81 set debug_print ($tmp) 81 set safe_debug_print ($tmp)
82end 82end
83document pp1 83document pp1
84Print the argument as an emacs s-expression 84Print the argument as an emacs s-expression
@@ -88,6 +88,31 @@ where the variable name would not otherwise
88be recorded in the GUD buffer. 88be recorded in the GUD buffer.
89end 89end
90 90
91# Print value of lisp variable
92define pv
93 set $tmp = "$arg0"
94 set safe_debug_print ( find_symbol_value (intern ($tmp)))
95end
96document pv
97Print the value of the lisp variable given as argument.
98Works only when an inferior emacs is executing.
99end
100
101# Print value of lisp variable
102define pv1
103 set $tmp = "$arg0"
104 echo $arg0
105 printf " = "
106 set safe_debug_print (find_symbol_value (intern ($tmp)))
107end
108document pv1
109Print the value of the lisp variable given as argument.
110Works only when an inferior emacs is executing.
111For use on tool bar when debugging in Emacs
112where the variable name would not otherwise
113be recorded in the GUD buffer.
114end
115
91# Print out current buffer point and boundaries 116# Print out current buffer point and boundaries
92define ppt 117define ppt
93 set $b = current_buffer 118 set $b = current_buffer