Comment
Comment by monk_the_dog
rr is my goto debugger. It opens up new super-powers for debugging scripts. Consider this gdb script:
And now step through forward to figure out what went wrong. This tool is worth your time to learn. There are a couple of minor annoyances (you can't re-use existing gdb scripts that contain the "run" command because the inferior is already running, but there are workarounds. Here's what I use:
There are a few other minor annoyances, but all in all a great tool.