rr logging mechanism

Steve Fink sphink at gmail.com
Sat Jun 3 00:20:57 UTC 2017

It's buried in a long boring document about other things, but one part that
might be of interest to people here -- I implemented a logging command for
gdb under rr, to allow making notes as you move through an execution. You
can then display them in original execution order:

(rr) log $thread sees the bad value  # $thread is replaced by eg T1
(rr) log also, obj is now $1         # gdb convenience vars ok
(rr) rfin
(rr) log {$2+4} bytes are required   # {any gdb expr}
(rr) n
(rr) log -sorted                     # log -s for short
   346/945 7 bytes are required
=> 562/8443 T2 sees the bad value
   562/8443 also, obj is now 0x7ff687749c00


It's also handy in combination with breakpoint command lists, so you can
automatically log the values of something over time and then see it in
execution order, interleaved with other log messages.

Some sort of structured log would probably make more sense, but this was a
quick hack.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20170602/2905f6d7/attachment.html>

More information about the rr-dev mailing list