[RFC] "single step" atomic instruction sequences as a whole on PPC

Jan Kratochvil jan.kratochvil@redhat.com
Wed May 9 18:34:00 GMT 2007


Hi Luis,

please check the attached two testcases and run them at least 100x etc.

Unfortunately the threaded one fails for me in some 7% of cases IMO due to
a race at the `infrun.c' line:
	remove_status = remove_breakpoints ();

The whole idea of running all the threads of the program to step over the
atomic sequence is problematic as the other threads may hit the inserted
breakpoint.  While this cases is handled it contains a race.

One way would be to use some temporary:
	if (scheduler_mode == schedlock_off)
	  scheduler_mode = schedlock_step;

But I believe one could use the PPC simulation code instead of the whole
breakpoint/resume way?


Regards,
Jan


On Wed, 09 May 2007 20:21:15 +0200, Luis Machado wrote:
> Daniel,
> 
> > Does Ulrich's observation imply that there is no test case for this
> > neat feature?  I would recommend one in gdb.arch (and maybe a NEWS
> > entry too).
> 
> I could work on providing a test case for this feature to be included on
> the GDB testsuite, as soon as i get familiar with the syntax.
> 
> About the instruction bits problem. Should i just literally assign a
> decimal number to the variable (16 in this case) or is it preferred to
> do a shift based on the hex value?
> 
> Thanks!
> Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomic-seq.tar.gz
Type: application/x-gzip
Size: 2768 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070509/6d69c929/attachment.bin>


More information about the Gdb-patches mailing list