diff options
| author | Kim F. Storm | 2005-11-09 23:13:56 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-11-09 23:13:56 +0000 |
| commit | 1609a9633f98795e6f5feb69a6a9b37dfac5d2b0 (patch) | |
| tree | ccc109e8a6ea84f8eb5fdb61baf802c7f67c0ffd /src | |
| parent | 9c797a34f5551dad3cefe798f3518de47bdd78e8 (diff) | |
| download | emacs-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/.gdbinit | 29 |
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 |
| 67 | define pp | 67 | define pp |
| 68 | set $tmp = $arg0 | 68 | set $tmp = $arg0 |
| 69 | set debug_print ($tmp) | 69 | set safe_debug_print ($tmp) |
| 70 | end | 70 | end |
| 71 | document pp | 71 | document pp |
| 72 | Print the argument as an emacs s-expression | 72 | Print 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) |
| 82 | end | 82 | end |
| 83 | document pp1 | 83 | document pp1 |
| 84 | Print the argument as an emacs s-expression | 84 | Print the argument as an emacs s-expression |
| @@ -88,6 +88,31 @@ where the variable name would not otherwise | |||
| 88 | be recorded in the GUD buffer. | 88 | be recorded in the GUD buffer. |
| 89 | end | 89 | end |
| 90 | 90 | ||
| 91 | # Print value of lisp variable | ||
| 92 | define pv | ||
| 93 | set $tmp = "$arg0" | ||
| 94 | set safe_debug_print ( find_symbol_value (intern ($tmp))) | ||
| 95 | end | ||
| 96 | document pv | ||
| 97 | Print the value of the lisp variable given as argument. | ||
| 98 | Works only when an inferior emacs is executing. | ||
| 99 | end | ||
| 100 | |||
| 101 | # Print value of lisp variable | ||
| 102 | define pv1 | ||
| 103 | set $tmp = "$arg0" | ||
| 104 | echo $arg0 | ||
| 105 | printf " = " | ||
| 106 | set safe_debug_print (find_symbol_value (intern ($tmp))) | ||
| 107 | end | ||
| 108 | document pv1 | ||
| 109 | Print the value of the lisp variable given as argument. | ||
| 110 | Works only when an inferior emacs is executing. | ||
| 111 | For use on tool bar when debugging in Emacs | ||
| 112 | where the variable name would not otherwise | ||
| 113 | be recorded in the GUD buffer. | ||
| 114 | end | ||
| 115 | |||
| 91 | # Print out current buffer point and boundaries | 116 | # Print out current buffer point and boundaries |
| 92 | define ppt | 117 | define ppt |
| 93 | set $b = current_buffer | 118 | set $b = current_buffer |