> [...] just click on the incorrect value. With full program history Pernosco can immediately explain where this value came from. The value is tracked backwards through events such as memcpys or moves in and out of registers until we reach a point where the value "originated" from, and each step in this process is displayed in the "Dataflow" panel that opens automatically. There is no need to read or understand the code and think about what might have happened, we can simply ask the debugger what did happen.
rr – record and replay debugger for C/C++
71–80 of 134 posts
Re: rr – record and replay debugger for C/C++
#72I've used rr very sucessfully for reverse engineering a large code base using a break on variable change combined with reverse-continue. Took the time to extract critical logic way down.
Re: rr – record and replay debugger for C/C++
#73Earlier quoted context omitted.
…or you can just waste a few bytes? It's not a big deal.
You can, but that makes the type system worse. Also depending on how these few bytes are used, they can add up and drag down performance.
Re: rr – record and replay debugger for C/C++
#74Earlier quoted context omitted.
I'm not so sure of this. Most code in a debugger doesn't have much to do with the source language. Line mapping and figuring out values for variables happens via symbol information, eg. DWARF, and compilers for multiple languages can produce that in the same format.
Does that neutral way of debugging work as well as having first-class explicit support for the language, or it's more of a lowest common denominator (kind of like what e.g. language support over LSP can offer and how conveniently, compared to what a native Lisp or Smalltalk environment's language support can offer)?
The neutral way of debugging is really debugging the raw machine code of a process. This requires OS integration for your low level manipulation primitives. To add language support, you then need to figure out how to define the semantics of your manipulations in terms of the low-level primitives.
If you have a rich runtime, you can add language-level debugging facilities that can operate at a higher level. However, this requires you to implement portions of a debugger in your runtime. Now you have to maintain a language, runtime, and debugger. It also means that if new debugger techniques are invented, such as time travel debugging, you do not get them for free since you embedded a debugger of your own design. So, like many similar things, it is a trade-off of specialization versus maintenance. The perennial question of use a library, or do it yourself.
Re: rr – record and replay debugger for C/C++
#75On Windows you can use WinDbg for the same thing. It has better support for debugging multi-threaded issues. https://www.forrestthewoods.com/blog/windbg-time-travelling-...
WinDbg uses a instruction-level emulation time travel implementation, so incurs the 10-20x slowdown associated with that technique. rr uses a replay-record time travel debugging implementation, which can incur far less overhead when done correctly. Last I saw, rr has overhead in the 2x slowdown range and, if I remember correctly, I have seen a different record-replay time travel debugger in the 10% range. 10% is 100x…
If you’re gonna throw around numbers like this you need to cite an actual tool not “if I remember correctly there exists a unicorn”.
Re: rr – record and replay debugger for C/C++
#76On Windows you can use WinDbg for the same thing. It has better support for debugging multi-threaded issues. https://www.forrestthewoods.com/blog/windbg-time-travelling-...
WinDbg uses a instruction-level emulation time travel implementation, so incurs the 10-20x slowdown associated with that technique. rr uses a replay-record time travel debugging implementation, which can incur far less overhead when done correctly. Last I saw, rr has overhead in the 2x slowdown range and, if I remember correctly, I have seen a different record-replay time travel debugger in the 10% range. 10% is 100x…
Re: rr – record and replay debugger for C/C++
#77Re: rr – record and replay debugger for C/C++
#78I've used rr very sucessfully for reverse engineering a large code base using a break on variable change combined with reverse-continue. Took the time to extract critical logic way down.
That sounds very interesting; Do you have a write-up on this that you are willing to share?
Re: rr – record and replay debugger for C/C++
#79Are rr’s problems with Ryzen CPUs now firmly in the past or not?
Re: rr – record and replay debugger for C/C++
#80Earlier quoted context omitted.
You can, but that makes the type system worse. Also depending on how these few bytes are used, they can add up and drag down performance.
No, my point is that it doesn't. If your zero-sized types are big your type system is not any worse: it's just less efficient.