Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Also allow -list-thread-groups (--available) without a live selected thread
Date: Wed, 14 Jan 2009 14:29:00 -0000	[thread overview]
Message-ID: <200901141428.53828.pedro@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

Similarly to -thread-info, -thread-list-ids, -list-thread-groups (--available)
should always be issuable without a live selected thread.

I tested it in non-stop mode, and all-stop sync/async as well with
success, with an exited thread selected.

In the all-stop async case, '-list-thread-groups' always works,
even if the target is running, because it isn't (currently) asking
the remote side for anything.  OTOH, '-list-thread-groups --available' will
error out with "Cannot execute this command while the target is running.",
which is expected due to limitations of the all-stop remote protocol
(same error as given by -thread-info).  In non-stop mode, it always
works.

Checked in.

-- 
Pedro Alves

[-- Attachment #2: list_thread_groups_any_time.diff --]
[-- Type: text/x-diff, Size: 899 bytes --]

2009-01-14  Pedro Alves  <pedro@codesourcery.com>

	* mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
	without a live selected thread.

---
 gdb/mi/mi-main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: src/gdb/mi/mi-main.c
===================================================================
--- src.orig/gdb/mi/mi-main.c	2009-01-14 14:15:21.000000000 +0000
+++ src/gdb/mi/mi-main.c	2009-01-14 14:21:03.000000000 +0000
@@ -1355,7 +1355,8 @@ mi_cmd_execute (struct mi_parse *parse)
 	  && (is_exited (inferior_ptid))
 	  && (strcmp (parse->command, "thread-info") != 0
 	      && strcmp (parse->command, "thread-list-ids") != 0
-	      && strcmp (parse->command, "thread-select") != 0))
+	      && strcmp (parse->command, "thread-select") != 0)
+	      && strcmp (parse->command, "list-thread-groups") != 0)
 	{
 	  struct ui_file *stb;
 	  stb = mem_fileopen ();

             reply	other threads:[~2009-01-14 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 14:29 Pedro Alves [this message]
2009-01-14 15:06 ` Marc Khouzam
2009-01-14 15:22   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901141428.53828.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox