[RFC] 01/10 Add "executing" property

Pedro Alves pedro@codesourcery.com
Mon May 19 16:52:00 GMT 2008


A Tuesday 06 May 2008 16:46:19, Pedro Alves wrote:
> The "running" property being added is a frontend view of the thread.
> While doing a step for instance, the inferior starts/stops several
> times while single-stepping.  We only clear the "running" state of
> the inferior when it does a normal_stop.  This is to prevent bombarding
> the frontend with a bunch of internal events.
>
> This patch adds a new field, that altough similar to "running"
> has a different usage.  It replaces the current target_executing
> global with a similar per-thread concept.  We can then use the
> is_executing check whenever we need to be sure the selected thread
> is stopped or executing.

Here's an updated patch.

- is_executing mishandled targets that don't register the main thread.
- There was a call to is_running in macroscope.c that should have
  been to is_executing.
- In all-stop/async with scheduler-locking != off, checking for is_executing 
  in the current  thread is not enough.  We should check if there's any thread 
  running.  thread.c gains a new any_running function for that.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-is_executing.diff
Type: text/x-diff
Size: 20689 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080519/644649db/attachment.bin>


More information about the Gdb-patches mailing list