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, rfa/doc] Multi-threaded watchpoint improvements


Daniel,

Somehow this patch has broken ppc software/hardware watchpoints. They
won't trigger anymore, no matter what, but they're still being correctly
created though. I'm not sure exactly where the problem is, but they
trigger when i revert this patch. It might be something on infrun.c
involving stopped_by_watchpoint.

I'll keep on looking at the code. If you need further details, i can
provide it.

Regards,

On Sun, 2007-09-30 at 20:20 -0400, Daniel Jacobowitz wrote:
> On Sun, Sep 16, 2007 at 02:39:49PM -0400, Daniel Jacobowitz wrote:
> > I have (finally, sorry for the delay) finished revamping the
> > multi-threaded watchpoint patches Jeff submitted ages ago and Luis
> > resubmitted recently.  This message contains all the changes except
> > for various native GNU/Linux target files.  It includes manual and
> > gdbint changes describing what I've figured out to date.
> 
> Here's the version I've checked in.  There was a merge conflict in
> breakpoint.c, at the end of bpstat_stop_status.  I think the code I'm
> removing is wrong - b->type refers back to the breakpoint b inside the
> loop, not necessarily the one in the bpstat.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery
> 
> 2007-09-30  Daniel Jacobowitz  <dan@codesourcery.com>
> 	    Jeff Johnston  <jjohnstn@redhat.com>
> 
> 	* breakpoint.c (watchpoints_triggered): New.
> 	(bpstat_stop_status): Remove STOPPED_BY_WATCHPOINT argument.
> 	Check watchpoint_triggered instead.  Combine handling for software
> 	and hardware watchpoints.  Do not use target_stopped_data_address
> 	here.  Always check a watchpoint if its scope breakpoint triggers.
> 	Do not stop for thread or overlay events.  Improve check for
> 	triggered watchpoints without a value change.
> 	(watch_command_1): Insert the scope breakpoint first.  Link the
> 	scope breakpoint to the watchpoint.
> 	* breakpoint.h (enum watchpoint_triggered): New.
> 	(struct breakpoint): Add watchpoint_triggered.
> 	(bpstat_stop_status): Update prototype.
> 	(watchpoints_triggered): Declare.
> 	* infrun.c (enum infwait_status): Add infwait_step_watch_state.
> 	(stepped_after_stopped_by_watchpoint): Delete.
> 	(handle_inferior_event): Make stepped_after_stopped_by_watchpoint
> 	local.  Handle infwait_step_watch_state.  Update calls to
> 	bpstat_stop_status.  Use watchpoints_triggered to check
> 	watchpoints.
> 	* remote.c (stepped_after_stopped_by_watchpoint): Remove extern.
> 	(remote_stopped_data_address): Do not check it.
> 
> 2007-09-30  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* gdb.texinfo (Setting Watchpoints): Adjust warning text about
> 	multi-threaded watchpoints.
> 	* gdbint.texinfo (Watchpoints): Describe how watchpoints are
> 	checked.  Describe sticky notification.  Expand description
> 	of steppable and continuable watchpoints.
> 	(Watchpoints and Threads): New subsection.
> 
> 2007-09-30  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* gdb.threads/watchthreads.c (thread_function): Sleep between
> 	iterations.
> 	* gdb.threads/watchthreads.exp: Allow two watchpoints to trigger
> 	at once for S/390.  Generate matching fails and passes.

-- 
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com


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