From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1fLYIQgYgGDnNQAAWB0awg (envelope-from ) for ; Wed, 21 Apr 2021 08:18:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 7D7A41F104; Wed, 21 Apr 2021 08:18:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 935541E789 for ; Wed, 21 Apr 2021 08:18:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDF9A39B587F; Wed, 21 Apr 2021 12:18:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDF9A39B587F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619007492; bh=Qnoc0JStmbOsi+AV6qfPcdrwpaitnifK2UBm9gGieaQ=; h=To:Subject:Date:In-Reply-To:References:In-Reply-To:References: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:From:Reply-To:From; b=VSNf3/LcDJe1RePwHd4YOJ6XJBwsSJlzFTnHcR4CiG6feMj1OmcikWxFLeIlNsR84 uqUfwu/iWwZoqjVWxJlgxZXfJlQQLll+QXr2wTK85Ld4HUViRdW0ydbe+S2Xwdj148 bc7D0tvfgjNew/3R+ZaGqNbmSByA1gSzd2eSSVls= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id 9854D3892454 for ; Wed, 21 Apr 2021 12:18:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9854D3892454 IronPort-SDR: NoZul+kXYXKxLUxMALOWg92g8DhhC7WAUVA3wOqqCFLFyu4xwE8EFRrqLPeYvwpkeaDJA1jfcN Pb3+j4yqQ3Vg== X-IronPort-AV: E=McAfee;i="6200,9189,9960"; a="259640630" X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="259640630" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 05:18:03 -0700 IronPort-SDR: Rqm+GOWBF6L4rbAx4M3YDKoyaEVp/IoKarCdB/YeXu0X6cBStF+UzV5qafCqxJmfNQxgr4PENB +w5KMESLehog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="445918726" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2021 05:18:02 -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 13LCI1uM031893; Wed, 21 Apr 2021 13:18:01 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id 13LCI1h0026443; Wed, 21 Apr 2021 14:18:01 +0200 Received: (from taktemur@localhost) by ulvlx001.iul.intel.com with LOCAL id 13LCI1x2026439; Wed, 21 Apr 2021 14:18:01 +0200 To: gdb-patches@sourceware.org Subject: [PATCH v3 1/4] gdb/breakpoint: display "N" on MI for disabled-by-condition locations Date: Wed, 21 Apr 2021 14:17:39 +0200 Message-Id: <1341ae83999a476ee31c409bd1763c1bbe24fe67.1619006869.git.tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: 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: , From: Tankut Baris Aktemur via Gdb-patches Reply-To: Tankut Baris Aktemur Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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 51e1c64a98a..ec15654ba58 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