diff options
author | Daniel Colascione <dancol@dancol.org> | 2018-06-09 15:41:29 -0700 |
---|---|---|
committer | Daniel Colascione <dancol@dancol.org> | 2018-06-09 17:46:05 -0700 |
commit | aaffae8458dcd774540e7e6b4219c8b5a9902075 (patch) | |
tree | e2689ed60bdd3c76084ac59552d223d6b1f294e8 /src/.gdbinit | |
parent | 16015dea97b3b4da7ff66a7e822c3c26b2ab6d2b (diff) | |
download | emacs-aaffae8458dcd774540e7e6b4219c8b5a9902075.tar.gz |
Add debug facility for formatting in rr sessions
The existing debug print commands don't work in rr, since they touch
stderr. The new xfmt command just calls Fformat and doesn't touch the
stdio streams.
* src/.gdbinit:
(xfmt): New GDB command.
* src/print.c:
(debug_format): New function.
Diffstat (limited to 'src/.gdbinit')
-rw-r--r-- | src/.gdbinit | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 67dcf718e3c..3cebdff5e7b 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -119,6 +119,12 @@ Print the value of the lisp variable given as argument. Works only when an inferior emacs is executing. end +# Format the value and print it as a string. Works in +# an rr session and during live debugging. Calls into lisp. +define xfmt + printf "%s\n", debug_format("%S", $arg0) +end + # Print out current buffer point and boundaries define ppt set $b = current_buffer |