]> git.eshelyaron.com Git - emacs.git/commitdiff
(pp, pp1): Use safe_debug_print.
authorKim F. Storm <storm@cua.dk>
Wed, 9 Nov 2005 23:13:56 +0000 (23:13 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 9 Nov 2005 23:13:56 +0000 (23:13 +0000)
(pv, pv1): New commands to print value of a lisp variable.

src/.gdbinit

index 94169be78958ed508816d0498c5fbb71d544a8ae..cb1deddb1ea5b1b8138bf9f1e8a746ddf81b3832 100644 (file)
@@ -66,7 +66,7 @@ end
 # Print out s-expressions
 define pp
   set $tmp = $arg0
-  set debug_print ($tmp)
+  set safe_debug_print ($tmp)
 end
 document pp
 Print the argument as an emacs s-expression
@@ -78,7 +78,7 @@ define pp1
   set $tmp = $arg0
   echo $arg0
   printf " = "
-  set debug_print ($tmp)
+  set safe_debug_print ($tmp)
 end
 document pp1
 Print the argument as an emacs s-expression
@@ -88,6 +88,31 @@ where the variable name would not otherwise
 be recorded in the GUD buffer.
 end
 
+# Print value of lisp variable
+define pv
+  set $tmp = "$arg0"
+  set safe_debug_print ( find_symbol_value (intern ($tmp)))
+end
+document pv
+Print the value of the lisp variable given as argument.
+Works only when an inferior emacs is executing.
+end
+
+# Print value of lisp variable
+define pv1
+  set $tmp = "$arg0"
+  echo $arg0
+  printf " = "
+  set safe_debug_print (find_symbol_value (intern ($tmp)))
+end
+document pv1
+Print the value of the lisp variable given as argument.
+Works only when an inferior emacs is executing.
+For use on tool bar when debugging in Emacs
+where the variable name would not otherwise
+be recorded in the GUD buffer.
+end
+
 # Print out current buffer point and boundaries
 define ppt
   set $b = current_buffer