Earlier quoted context omitted.
If you want to mention this, then you very clearly haven't actually tried it. The implementation in GDB is more convenient than rr (you can start/stop recording at will), but it is also orders of magnitude less efficient. It's only usable for very small code snippets. Otherwise it takes effectively forever and/or runs out of resources.
> runs out of resources RAM? What kind of dev box runs out of RAM in 2024? I built a 64GB RAM dev box during COVID-19 crisis. I have never once come close to using all that RAM, even with a squillion Chrome tabs open. Still, thank you to share your first-hand experience. Did you ask the GDB Dev team for any feedback on the slow performance?
rr – record and replay debugger for C/C++
121–130 of 134 posts
Re: rr – record and replay debugger for C/C++
#122Earlier quoted context omitted.
This isn't really true. Rust has a much better type system. When writing generic code the impact is enormous. C++ doesn't have a real Empty Type, and it thinks Units have non-zero size. In practical terms this makes it incredibly wasteful and in terms of a clear abstraction it encourages you to come up with a hack that's unclear but efficient.
Can you instantiate an empty type? If yes, are all instances unique? Years ago, I was surprised to learn how C++ handles the (essentially) empty type (no data): A single byte to differentiate each instance.
Re: rr – record and replay debugger for C/C++
#123Can someone explain how it works?
Re: rr – record and replay debugger for C/C++
#124I'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++
#125Re: rr – record and replay debugger for C/C++
#126I'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.
May I assume the large codebase was written in a language with (for lack of a better term) dynamic types?
Re: rr – record and replay debugger for C/C++
#127rr record /tmp/Debug/bin/llvm-mc a.s && rr replay -d cgdb
I've have success story with some bugs only reproducible with LTO. Without rr it would be a significant challenge.
It would be nice if Linux kernel could be debugged with rr. Does anyone have success with kernel under rr+qemu ? :)
Re: rr – record and replay debugger for C/C++
#128I almost use rr every day, along with a gdb frontend: cgdb. rr record /tmp/Debug/bin/llvm-mc a.s && rr replay -d cgdb I've have success story with some bugs only reproducible with LTO. Without rr it would be a significant challenge. It would be nice if Linux kernel could be debugged with rr. Does anyone have success with kernel under rr+qemu ? :)
Re: rr – record and replay debugger for C/C++
#129Earlier quoted context omitted.
rr predates the one in gdb if I am not mistaken
rr was introduced in 2014 [1]. gdb reverse debugging was introduced in 2009 [2]. You can see a fairly comprehensive history of time travel debugging here [3]. Not to say the built-in gdb reverse debugging was any good. It had (has?) like 1,000,000% overhead which is basically unusable. At least some implementations in the history that were introduced earlier only had ~1,000% overhead or less in general. Yes, a litera…
Re: rr – record and replay debugger for C/C++
#130Earlier quoted context omitted.
rr predates the one in gdb if I am not mistaken
Actually the gdb implementation predates rr, but (as an rr maintainer) I have to say that it is vastly inferior to rr. It's about 1000x slower than rr, and can't record across system calls or multiple threads or processes. It's so limited it's really a different feature.