[RFC: 3/9] Make stop_bpstat per-thread in all-stop, and don't context-switch

Pedro Alves pedro@codesourcery.com
Sat Aug 16 15:33:00 GMT 2008


This patch removes the global stop_bpstat, in favour of accessing
the equivalent member in thread_info.  stop_bpstat is currently
per-thread in non-stop, and global in all-stop.  This patches makes
it per-thread in all-stop too.

Noteworty:

 - bpstat_do_actions had an implicit assumption that its
   caller passed the address of the global stop_bpstat.
   There's an internal goto loop inside it, that loops
   whenever a breakpoint had an attached command that
   proceeded the inferior.

   Since we're making stop_bpstat a per-thread property, the
   assumption above breaks.  Instead, I've renamed bpstat_do_actions
   to bpstat_do_actions_1, and made a new function bpstat_do_actions
   that calls the old one in a loop, passing the stop_bpstat of the
   current thread.

 - Given that stop_bpstat was global in all-stop, continuing with an
   ignore count in all-stop sets the ignore count on any breakpoint
   the inferior last stopped at, independently of the user switching
   threads.  That is, the below sets the ignore count on breakpoint 1

   <stop in thread 2, breakpoint 1>
   thread 3
   continue 10

   I'm preserving that behaviour.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 003-stop_bpstat.diff
Type: text/x-diff
Size: 28826 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080816/8dd6c6f8/attachment.bin>


More information about the Gdb-patches mailing list