This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Wed, May 09, 2007 at 08:33:19PM +0200, Jan Kratochvil wrote:
> 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?

This has come up before; I think we need to come up with a better
default behavior for "step" that does not do this.  Here's the last
discussion I remember:
  http://sourceware.org/ml/gdb/2006-11/msg00211.html

Should I try again?

I hadn't thought about this case, of trying to step over a touchy
atomic sequence; I don't see any way we could make it work if we let
more than one thread run at once.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]