From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by sourceware.org (Postfix) with ESMTPS id EE8DF394741E for ; Thu, 8 Apr 2021 14:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EE8DF394741E IronPort-SDR: Q7L6NCr9E3pcY+kXpupRyf3fDUZGlCGyaMIWAyzOf4q4Sz2adjhDLSeSP/XVUGyzYfewNKyacK NoUmIetezSGg== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="278825440" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="278825440" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 07:22:54 -0700 IronPort-SDR: 5yalb97O1yr4U14bbuY3i8AbkA3b2qhg/0jw1J/gqtw989qXHNTGnqL2/UfpZr/J4KUwDTwQDD Y4xYbhMRitwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="422268594" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga008.jf.intel.com with ESMTP; 08 Apr 2021 07:22:53 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 138EMq2M008529; Thu, 8 Apr 2021 15:22:52 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id 138EMqpp021478; Thu, 8 Apr 2021 16:22:52 +0200 Received: (from taktemur@localhost) by ulvlx001.iul.intel.com with LOCAL id 138EMqnv021474; Thu, 8 Apr 2021 16:22:52 +0200 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [PATCH v2 1/4] gdb/breakpoint: display "N" on MI for disabled-by-condition locations Date: Thu, 8 Apr 2021 16:22:36 +0200 Message-Id: <06e440a9e7a7768166a896b61b92bd571b2fcdc5.1617875845.git.tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: X-Spam-Status: No, score=-16.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 14:22:58 -0000 For breakpoint locations that are disabled because of an invalid condition, CLI displays "N*" in the 'enabled' field, where '*' refers to the footnote below the table: (*): Breakpoint condition is invalid at this location. This is not necessary for MI, where we shall simply print "N" without the footnote. Update the document to mention the "N" value for the MI. Also remove the line about the 'enable' field, because there is no such field for locations. gdb/ChangeLog: 2021-04-08 Tankut Baris Aktemur * breakpoint.c (print_one_breakpoint_location): Display "N" for disabled-by-condition locations on MI-like output. (breakpoint_1): Do not display the disabled-by-condition footnote if the output is MI-like. gdb/doc/ChangeLog: 2021-04-08 Tankut Baris Aktemur * gdb.texinfo (GDB/MI Breakpoint Information): Update the description for the 'enabled' field of breakpoint locations. --- gdb/breakpoint.c | 8 ++++++-- gdb/doc/gdb.texinfo | 13 ++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 16cf7977b62..0136019b4ae 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -6190,8 +6190,12 @@ print_one_breakpoint_location (struct breakpoint *b, /* 4 */ annotate_field (3); + /* For locations that are disabled because of an invalid condition, + display "N*" on CLI, where "*" refers to a footnote below the + table. For MI, simply display a "N" without a footnote. */ + const char *N = (uiout->is_mi_like_p ()) ? "N" : "N*"; if (part_of_multiple) - uiout->field_string ("enabled", (loc->disabled_by_cond ? "N*" + uiout->field_string ("enabled", (loc->disabled_by_cond ? N : (loc->enabled ? "y" : "n"))); else uiout->field_fmt ("enabled", "%c", bpenables[(int) b->enable_state]); @@ -6716,7 +6720,7 @@ breakpoint_1 (const char *bp_num_list, bool show_internal, if (last_loc && !server_command) set_next_address (last_loc->gdbarch, last_loc->address); - if (has_disabled_by_cond_location) + if (has_disabled_by_cond_location && !uiout->is_mi_like_p ()) uiout->message (_("(*): Breakpoint condition is invalid at this " "location.\n")); } diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7dbffb65d53..438dcca5039 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -30047,9 +30047,16 @@ number of the parent breakpoint. The second digit is the number of the location within that breakpoint. @item enabled -This indicates whether the location is enabled, in which case the -value is @samp{y}, or disabled, in which case the value is @samp{n}. -Note that this is not the same as the field @code{enable}. +There are three possible values, with the following meanings: +@table @code +@item y +The location is enabled. +@item n +The location is disabled by the user. +@item N +The location is disabled because the breakpoint condition is invalid +at this location. +@end table @item addr The address of this location as an hexidecimal number. -- 2.17.1