Open Keno opened 8 years ago
Unfortunately that is a gdb limitation. I don't know why they impose that limitation --- rr could support this (though it would be slow).
I suggest filing a gdb bug about this at https://sourceware.org/bugzilla.
To be clear, there's no actual rr work required here. gdb could evaluate breakpoint conditions which are function calls during reverse execution just the same way it does during forward execution with rr.
FWIW, you can probably simulate a conditional breakpoint by using the gdb commands
command and some macrology to automatically continue
if your breakpoint condition doesn't hold.
@tromey is this something that could happen?
Offhand I don't know why the restriction is there. It's easy to test though: open gdb/infcall.c
and search for the error message, then remove the call to error
. One other possible hack might be to temporarily change the execution direction at this spot, though I don't know what other effects that might have.
I also suggest filing an upstream bug.
I tried just removing the error out in gdb/infcall.c but that didn't make things work.
OTOH this (with a help of make_scope_exit()
from gdb_support/scope_exit.h
)
One other possible hack might be to temporarily change the execution direction at this spot
seems to be working here.
Maybe this is wishful thinking, but I was hoping to be able to set a conditional breakpoint during reverse-continue. Unfortunately gdb complains that it
"Cannot call functions in reverse mode."
. I don't particularly care that it be fast, but it would be nice if there was some way that this could be made work.