From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31960 invoked by alias); 7 May 2013 12:25:45 -0000 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 Received: (qmail 31910 invoked by uid 89); 7 May 2013 12:25:42 -0000 X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 12:25:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C4CF42EDAB; Tue, 7 May 2013 08:25:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id luIe8ZR5n9Pp; Tue, 7 May 2013 08:25:39 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 822642EDB2; Tue, 7 May 2013 08:25:39 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4233) id 7AA1B3FF0A; Tue, 7 May 2013 08:25:39 -0400 (EDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Pedro Alves , Joel Brobecker Subject: [RFA 2/3] Improve output of "maintenance info sol-threads" command. Date: Tue, 07 May 2013 12:25:00 -0000 Message-Id: <1367929532-4849-3-git-send-email-brobecker@adacore.com> In-Reply-To: <518284AF.5090802@redhat.com> References: <518284AF.5090802@redhat.com> X-SW-Source: 2013-05/txt/msg00198.txt.bz2 This patch does the following: - Puts the startfunc and "Sleep func" info on the same line; - Renames "Sleep func" into "sleepfunc" to be consistent with "startfunc" - Avoids the use of a '-' as a separate before the "sleepfunc" output, because the '-' looks odd and out of place when the "startfunc" field is not printed (ti.ti_startfunc is nul). - Use a '=' instead of ':' and avoids the space between the name of the value and its value, mostly to help group the value with its name. gdb/ChangeLog: * sol-thread.c (info_cb): Rework the output of the "maintenance info sol-threads" command a bit. I could probably commit this one without approval, but someone else's thoughts would be welcome, since this is a bit cosmetic. --- gdb/sol-thread.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index 2e76700..fb89723 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -1177,10 +1177,10 @@ info_cb (const td_thrhandle_t *th, void *s) = lookup_minimal_symbol_by_pc (ti.ti_startfunc); if (msym.minsym) - printf_filtered (" startfunc: %s\n", + printf_filtered (" startfunc=%s", SYMBOL_PRINT_NAME (msym.minsym)); else - printf_filtered (" startfunc: %s\n", + printf_filtered (" startfunc=%s", paddress (target_gdbarch (), ti.ti_startfunc)); } @@ -1191,16 +1191,14 @@ info_cb (const td_thrhandle_t *th, void *s) = lookup_minimal_symbol_by_pc (ti.ti_pc); if (msym.minsym) - printf_filtered (" - Sleep func: %s\n", + printf_filtered (" sleepfunc=%s", SYMBOL_PRINT_NAME (msym.minsym)); else - printf_filtered (" - Sleep func: %s\n", + printf_filtered (" sleepfunc=%s", paddress (target_gdbarch (), ti.ti_pc)); } - /* Wrap up line, if necessary. */ - if (ti.ti_state != TD_THR_SLEEP && ti.ti_startfunc == 0) - printf_filtered ("\n"); /* don't you hate counting newlines? */ + printf_filtered ("\n"); } else warning (_("info sol-thread: failed to get info for thread.")); -- 1.7.0.4