Earlier quoted context omitted.
This is the usual killer feature of something like rr. You debug, look at some variable: `p whatever`. You see that its value is wrong. You want to know where this wrong value came from, so you `watch -l whatever` and `rc`. Bam!
There are some bugs I would never have figured out without this technique. It feels like cheating.
rr – record and replay debugger for C/C++
91–100 of 134 posts
Re: rr – record and replay debugger for C/C++
#92Re: rr – record and replay debugger for C/C++
#93Long ago, VMWare workstation supported doing this, but not just for userspace programs but also for kernels and even drivers, in a VM. The feature shipped and existed for a few versions before it was killed by internal politics.
Re: rr – record and replay debugger for C/C++
#94I assume rr provides more features and flexibility. Anyway I want to mention that GDB itself can already reverse debug for some time now.
Re: rr – record and replay debugger for C/C++
#95Earlier quoted context omitted.
I don't understand the "rewrite X/Y/Z in Rust" trend that has been going for a few years. I'm not familiar with Rust, but I'm almost sure it has a good C interoperability. If a certain piece of software is working well, what is the benefit of rewriting it in Rust?
> If a certain piece of software is working well, what is the benefit of rewriting it in Rust? One benefit is it's easier to hide malicious code thanks to Rust's complicated syntax.
Re: rr – record and replay debugger for C/C++
#96GDBs built-in reverse debugging: https://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial I assume rr provides more features and flexibility. Anyway I want to mention that GDB itself can already reverse debug for some time now.
Re: rr – record and replay debugger for C/C++
#97Earlier quoted context omitted.
This is the usual killer feature of something like rr. You debug, look at some variable: `p whatever`. You see that its value is wrong. You want to know where this wrong value came from, so you `watch -l whatever` and `rc`. Bam!
There are some bugs I would never have figured out without this technique. It feels like cheating.
Re: rr – record and replay debugger for C/C++
#98[flagged]
My previous job was in compiler engineering and I worked on upstream LLVM for a little while. rr was indispensable for me — not just for debugging, but as a tool for understanding how the compiler works in general. For example: you can set a watchpoint on an object in memory, and reverse-execute to the point where it was instantiated. This allowed you to answer questions such as ‘which optimisation pass was responsib…
Re: rr – record and replay debugger for C/C++
#99Earlier quoted context omitted.
rr uses gdb as the actual debugger part, so anything that works in gdb will work in rr. (you won't get rr running on windows though, as it is very much linux-specific, having to wrap all of its syscalls. The linux symbol info thing is DWARF)
Ok yeah, of course. I'd even argue that cross platform debuggers are not a thing to be desired. Too much low level integration with the operating system is needed when implementing one.
Re: rr – record and replay debugger for C/C++
#100GDBs built-in reverse debugging: https://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial I assume rr provides more features and flexibility. Anyway I want to mention that GDB itself can already reverse debug for some time now.