[patch] Single stepping over atomic instruction sets for GDB 6.6

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] Single stepping over atomic instruction sets for GDB 6.6

Luis Machado-5
Hi folks,

This is the patch for handling the sigle stepping of atomic instruction
sets previously posted on this list refreshed for the stable version 6.6
of GDB, in case users of this version would like to use it.

Best regards,
Luis

single_stepping.diff (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Single stepping over atomic instruction sets for GDB 6.6

Jan Kratochvil-2
On Mon, 23 Apr 2007 20:19:31 +0200, Luis Machado wrote:
...
> This is the patch for handling the sigle stepping of atomic instruction
> sets previously posted on this list refreshed for the stable version 6.6
> of GDB, in case users of this version would like to use it.

It fails for me on the attached testcase on gdb-6.6.ppc64 in 99% cases with
        infrun.c:1567: internal-error: handle_inferior_event: Assertion `SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p' failed.
        (tested on 4x CPU POWER5+, kernel-2.6.18-8.1.1.el5.ppc64)

The attached patch ON TOP OF YOURS fixes this problem (mostly, see below).

This patch has not been ported to HEAD as the last CVS version of your patch
I found is
        http://sourceware.org/ml/gdb-patches/2007-03/msg00145.html
which is no longer applicable to HEAD, please update it.

--

This fix is not 100%, though, it now passes only in 93% cases, in the remaining
7% of cases it will prematurely FAIL due to (missed breakpoint)
        Program exited normally.

I believe it is not a failure of this fix but some unrelated PPC port problem.
Unfortunately this "Program exited normally." FAIL becomes unreproducible while
trying to debug it (`set debug infrun 1'), there is some race.


Regards,
Jan

gdb-6.6-stepping_past_singlestep.patch (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Single stepping over atomic instruction sets for GDB 6.6

Luis Machado-5
Jan,

I've sent a version for CVS HEAD, but it seems it didn't make its way to
the list. I re-submitted it now. You should have access to it through
this url:

http://sourceware.org/ml/gdb-patches/2007-04/msg00386.html

I'd like to better understand your patch. So please, if you could go
through the modifications, that would be nice.

Thanks for the update!

Best Regards,
Luis


On Sat, 2007-04-28 at 19:56 +0200, Jan Kratochvil wrote:

> On Mon, 23 Apr 2007 20:19:31 +0200, Luis Machado wrote:
> ...
> > This is the patch for handling the sigle stepping of atomic instruction
> > sets previously posted on this list refreshed for the stable version 6.6
> > of GDB, in case users of this version would like to use it.
>
> It fails for me on the attached testcase on gdb-6.6.ppc64 in 99% cases with
> infrun.c:1567: internal-error: handle_inferior_event: Assertion `SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p' failed.
> (tested on 4x CPU POWER5+, kernel-2.6.18-8.1.1.el5.ppc64)
>
> The attached patch ON TOP OF YOURS fixes this problem (mostly, see below).
>
> This patch has not been ported to HEAD as the last CVS version of your patch
> I found is
> http://sourceware.org/ml/gdb-patches/2007-03/msg00145.html
> which is no longer applicable to HEAD, please update it.
>
> --
>
> This fix is not 100%, though, it now passes only in 93% cases, in the remaining
> 7% of cases it will prematurely FAIL due to (missed breakpoint)
> Program exited normally.
>
> I believe it is not a failure of this fix but some unrelated PPC port problem.
> Unfortunately this "Program exited normally." FAIL becomes unreproducible while
> trying to debug it (`set debug infrun 1'), there is some race.
>
>
> Regards,
> Jan

Reply | Threaded
Open this post in threaded view
|

Re: [patch] Single stepping over atomic instruction sets for GDB 6.6

Jan Kratochvil-2
On Sun, 29 Apr 2007 01:35:41 +0200, Luis Machado wrote:
...
> I'd like to better understand your patch. So please, if you could go
> through the modifications, that would be nice.

Your patch sets SINGLESTEP_BREAKPOINTS_INSERTED_P conditionally, according to
whether SOFTWARE_SINGLE_STEP () was successful.
SINGLESTEP_BREAKPOINTS_INSERTED_P was always set before so the original GDB
code does not expect it can be unset.

I have updated the code to handle the case when SOFTWARE_SINGLE_STEP () failed
(and so SINGLESTEP_BREAKPOINTS_INSERTED_P is unset; it could safely fail to
software singlestep because hardware singlestepping feature is available).


Regards,
Jan
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Single stepping over atomic instruction sets for GDB 6.6

Luis Machado-5
Thanks Jan,

I think your patch could be applied on top of the first piece of the
single stepping patch, the one that actually changed code on infrun.c.
It's already in HEAD.

http://sourceware.org/ml/gdb-cvs/2007-04/msg00043.html

Regards,
Luis


On Sun, 2007-04-29 at 09:07 +0200, Jan Kratochvil wrote:

> On Sun, 29 Apr 2007 01:35:41 +0200, Luis Machado wrote:
> ...
> > I'd like to better understand your patch. So please, if you could go
> > through the modifications, that would be nice.
>
> Your patch sets SINGLESTEP_BREAKPOINTS_INSERTED_P conditionally, according to
> whether SOFTWARE_SINGLE_STEP () was successful.
> SINGLESTEP_BREAKPOINTS_INSERTED_P was always set before so the original GDB
> code does not expect it can be unset.
>
> I have updated the code to handle the case when SOFTWARE_SINGLE_STEP () failed
> (and so SINGLESTEP_BREAKPOINTS_INSERTED_P is unset; it could safely fail to
> software singlestep because hardware singlestepping feature is available).
>
>
> Regards,
> Jan