Repository navigation
Fix restart bugs (DON'T MERGE) - #1257
rocallahan wants to merge 4 commits into
Conversation
|
When I call
There's some irrelevant breakpoint setting and clearing in there. It looks like the two siginfo reads correspond to calling |
… performed before we've resumed the replay.
…t restarts) as valid reasons to end a diversion.
Also tests complex tracee function call atomic_printf("hello%s", "kitty"),
which triggered an rr bug where the diversion session died too early, after
the malloc() allocating space for the first string.
|
OK, these new commits pass tests. Basically we allow gdb to restore registers to their old values after a siginfo write without reviving the diversion. Any other register writes, or any memory writes, revive the diversion. @cgjones, does this approach seem OK? |
I think I understand this, and it seems OK. I wonder if it's extra complex though: would it have sufficed to "addref" the diversion on each READ_SIGINFO and then unref on WRITE_SIGINFO? (I was originally going to add this, but I changed my mind because I didn't want to rely on gdb pairing READ/WRITE_SIGINFO requests. We can test that though.) |
|
Here's an alternate patch that implements the ref/unref approach Passes your test. A bit simpler; what do you think? |
|
With a fairly complicated nested call, gdb nests its READ/WRITE_SIGINFO requests in the right way for rr to destroy the diversion at the right time. Not sure which assumption is less shaky ... |
|
I like your approach better! But we need more descriptive names than |
OK, I made that change and added more assertions about these interfaces only being used when |
This causes
call_functionto fail because its final "cont" command does not return to the replay session. I haven't figured that out yet, but I wanted to post my work and get some advice.The test included in this PR currently fails for two main reasons:
atomic_printf("hello%s", "kitty")fails. Actually the simpler versionatomic_printf("hello")also fails, because gdb rigs a call tomalloc()to allocate space for the string, and after that call we end the diversion session; gdb does more set-reg and set-mem calls to set up theatomic_printf, which are ignored, then itsvContresumes the replay session.Patches to make Firefox work again #2 is the real bug I was trying to fix. The fix for that is trivial. But along the way I discovered bug Various changes to get things building and working on my 64-bit Fedora 17 system #1.