Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI non-stop 09/11] Don't care about user-defined thread if --thread is present.
@ 2008-06-28 17:02 Vladimir Prus
  2008-07-11 13:52 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2008-06-28 17:02 UTC (permalink / raw)
  To: gdb-patches


If an MI command has --thread parameter, we don't care in any way
that user selected thread is. Will commit after core non-stop is in.

- Volodya

	* mi/mi-main.c (mi_cmd_execute): Suppress check for
	non-null user-selected thread if explicit thread is specified.
---
 gdb/mi/mi-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 0b5d076..7d4adc4 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1184,7 +1184,8 @@ mi_cmd_execute (struct mi_parse *parse)
   
   if (parse->cmd->argv_func != NULL)
     {
-      if (target_can_async_p ()
+      if (parse->thread == -1
+	  && target_can_async_p ()
 	  && target_has_execution
  	  && (ptid_equal (user_selected_ptid, null_ptid))
 	  && (strcmp (parse->command, "thread-info") != 0
-- 
1.5.3.5



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [MI non-stop 09/11] Don't care about user-defined thread if --thread is present.
  2008-06-28 17:02 [MI non-stop 09/11] Don't care about user-defined thread if --thread is present Vladimir Prus
@ 2008-07-11 13:52 ` Pedro Alves
  2008-07-13  4:34   ` Vladimir Prus
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2008-07-11 13:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Vladimir Prus

A Saturday 28 June 2008 17:58:04, Vladimir Prus wrote:
> If an MI command has --thread parameter, we don't care in any way
> that user selected thread is. Will commit after core non-stop is in.
>

Note that the version that was committed doesn't have user_selected_ptid
anymore, and neither an inferior_ptid == null_ptid case, as long as the
target still has execution.  I think that you're already checking
if the thread is THREAD_EXITED somewhere else before letting the
command run, so this will disappear.

> - Volodya
>
> 	* mi/mi-main.c (mi_cmd_execute): Suppress check for
> 	non-null user-selected thread if explicit thread is specified.
> ---
>  gdb/mi/mi-main.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
> index 0b5d076..7d4adc4 100644
> --- a/gdb/mi/mi-main.c
> +++ b/gdb/mi/mi-main.c
> @@ -1184,7 +1184,8 @@ mi_cmd_execute (struct mi_parse *parse)
>
>    if (parse->cmd->argv_func != NULL)
>      {
> -      if (target_can_async_p ()
> +      if (parse->thread == -1
> +	  && target_can_async_p ()
>  	  && target_has_execution
>   	  && (ptid_equal (user_selected_ptid, null_ptid))
>  	  && (strcmp (parse->command, "thread-info") != 0



-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [MI non-stop 09/11] Don't care about user-defined thread if --thread is present.
  2008-07-11 13:52 ` Pedro Alves
@ 2008-07-13  4:34   ` Vladimir Prus
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Prus @ 2008-07-13  4:34 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On Friday 11 July 2008 17:51:59 Pedro Alves wrote:
> A Saturday 28 June 2008 17:58:04, Vladimir Prus wrote:
> > If an MI command has --thread parameter, we don't care in any way
> > that user selected thread is. Will commit after core non-stop is in.
> >
> 
> Note that the version that was committed doesn't have user_selected_ptid
> anymore, 

Oh, that was a nice concept :-)

> and neither an inferior_ptid == null_ptid case, as long as the 
> target still has execution.  I think that you're already checking
> if the thread is THREAD_EXITED somewhere else before letting the
> command run, so this will disappear.

I don't think I check for THREAD_EXITED. OTOH, given that now the check
for non-exiteness applies not to user-selected thread, but to the thread
we ultimately operate on (after --thread is processed), I don't think 
this patch is necessary any more.

- Volodya


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-13  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-28 17:02 [MI non-stop 09/11] Don't care about user-defined thread if --thread is present Vladimir Prus
2008-07-11 13:52 ` Pedro Alves
2008-07-13  4:34   ` Vladimir Prus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox