This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [reverse/record] adjust_pc_after_break in reverse execution mode?
Hi Pedro,
On Thu, Oct 30, 2008 at 19:07, Pedro Alves <pedro@codesourcery.com> wrote:
>
> On Tuesday 28 October 2008 22:51:52, Michael Snyder wrote:
>
> > Well, before I can evaluate the patch, I need a test case
> > to see what behavior it is fixing. Doesn't have to be a
> > formal DEJAGNU script, just something like the printf example
> > that you posted for the other bug.
> >
> > Right now, I am unable to get the reverse-20080930-branch
> > to exhibit any bad behavior that I could attribute to this
> > issue. It seems to work just fine...
>
> Wouldn't that be the extended nop+goto example I posted?
>
> http://sourceware.org/ml/gdb-patches/2008-10/msg00599.html
Yes, It's OK with the newest patch.
>
> Hui, I'm now lost in this huge thread that never seems to
> end, but I think that the last patch I saw, you still
> missed that you should check for software_breakpoint_inserted_here_p
> before doing the adjustment (see adjust_pc_after_break) --- it was
> there in the first patch I posted to address this issue.
>
> This decr after break business sucks. For remote targets implementing
> software breakpoints, it would probably be best if we had a remote protocol
> feature with a corresponding property for this at the target_ops level that
> overrides the gdbarch setting. There are probably many targets out there
> implementing Z0 breakpoints that do the adjustment themselves. It's just
> that it's not common to trip on it, so it gets by.
That is a really good idea.
Maybe we can add a special interface in target_ops tell the infrun.c
that this PC need adjust_pc_after_break or not.
Thanks,
Hui