From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25713 invoked by alias); 14 Jan 2009 14:29:21 -0000 Received: (qmail 25703 invoked by uid 22791); 14 Jan 2009 14:29:20 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Jan 2009 14:28:30 +0000 Received: (qmail 17675 invoked from network); 14 Jan 2009 14:28:27 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Jan 2009 14:28:27 -0000 From: Pedro Alves 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 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_lafbJQEShtzzSet" Message-Id: <200901141428.53828.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00314.txt.bz2 --Boundary-00=_lafbJQEShtzzSet Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 703 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 --Boundary-00=_lafbJQEShtzzSet Content-Type: text/x-diff; charset="iso 8859-15"; name="list_thread_groups_any_time.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="list_thread_groups_any_time.diff" Content-length: 899 2009-01-14 Pedro Alves * 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 (); --Boundary-00=_lafbJQEShtzzSet--