Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Also allow -list-thread-groups (--available) without a live selected thread
@ 2009-01-14 14:29 Pedro Alves
  2009-01-14 15:06 ` Marc Khouzam
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2009-01-14 14:29 UTC (permalink / raw)
  To: gdb-patches

[-- 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 ();

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

end of thread, other threads:[~2009-01-14 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-14 14:29 Also allow -list-thread-groups (--available) without a live selected thread Pedro Alves
2009-01-14 15:06 ` Marc Khouzam
2009-01-14 15:22   ` Pedro Alves

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