This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [non-stop] 01/10 Add "executing" property
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 25 Jun 2008 21:48:27 +0400
- Subject: Re: [non-stop] 01/10 Add "executing" property
- References: <200806152203.14626.pedro@codesourcery.com>
Pedro Alves wrote:
> +
> +/* Reports if thread PTID is executing. Â*/
> +extern int is_executing (ptid_t ptid);
I know if follows is_running, introduced by me, but I think this is not
the best interface. Say, somewhere later in this patch series we have
this function:
static int
proceed_thread_callback (struct thread_info *thread, void *arg)
{
if (!is_stopped (thread->ptid))
....
Here, we already have thread_info, and using ptid to search for thread
again, and get its state seems not nice. How about:
extern int is_executing (struct thread_info *thread);
extern int is_executing_ptid (ptid_t ptid);
and a similar change for is_running?
- Volodya