From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35426 invoked by alias); 31 May 2018 08:39:40 -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 33450 invoked by uid 89); 31 May 2018 08:39:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hey X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0069.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 May 2018 08:39:36 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Thu, 31 May 2018 08:39:33 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64%7]) with mapi id 15.20.0820.010; Thu, 31 May 2018 08:39:32 +0000 From: Alan Hayward To: Joel Brobecker CC: "gdb-patches@sourceware.org" , nd Subject: Re: NEED FEEDBACK: time to start the GDB 8.2 release process (2018-05-30 update) Date: Thu, 31 May 2018 09:23:00 -0000 Message-ID: <85BCF124-2063-4309-A836-FD35C0AB7A81@arm.com> References: <20180530225306.jbf5xtpgvkmno7md@adacore.com> In-Reply-To: <20180530225306.jbf5xtpgvkmno7md@adacore.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2375;7:SXSErpfa9JIh6ePYlct49204e+J4f9fud4hF53TpBr+IS/3RTNQ7K7Xwuhus9UlExpUIqDlrfFv0HeJsk6eIvoiX4L0e6+fBUvhYp1ISER5DxjNV5UwEsmimJgNU1Mru8WL1Hjau5IAfwoXG9E9rqre8kyOGE6Aek5jhJcE2qTtgk+BRJsBVDvJRLrgMIbX8Hfvl/uAjzEIxBSZKj1o2Ea0xKC1XCywPTeBanpnDnO6lgKEtWIvzxWiIrTmyCCi1 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DB6PR0802MB2375; x-ms-traffictypediagnostic: DB6PR0802MB2375: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(5213294742642); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:DB6PR0802MB2375;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2375; x-forefront-prvs: 06891E23FB x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39380400002)(396003)(346002)(366004)(39860400002)(189003)(199004)(53754006)(97736004)(6916009)(4326008)(14454004)(6116002)(3846002)(478600001)(102836004)(5250100002)(7736002)(36756003)(8936002)(316002)(186003)(25786009)(26005)(59450400001)(66066001)(966005)(57306001)(72206003)(50226002)(53546011)(83716003)(76176011)(68736007)(99286004)(6246003)(54906003)(53936002)(6506007)(106356001)(3660700001)(305945005)(2900100001)(105586002)(82746002)(86362001)(2906002)(6306002)(6512007)(486006)(8676002)(5660300001)(6486002)(229853002)(2616005)(11346002)(476003)(3280700002)(33656002)(81156014)(81166006)(446003)(6436002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2375;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: fpEvuNukx6LyHymMi1GtWh0A3JSgvHwVUDlENsWN2C7Vt8uHLSDk3vQ4SYGvkcnnMRKYQu86bMrEIjHzaiOW7Xfly7PS2WpvaStlS4XDBIMAxMzXaZUb34VddtQAoEqwKmJLnc/+xxGo2hlNyaLpPrNLm1f/JegPh0mVyC54kJoAc5YL1eMi6gFJuKtMApox spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <1A82B33A8E4CB5488A8F1B23C2F1BBD6@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: bd0fdbda-0ec2-4a1a-d926-08d5c6d2086c X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd0fdbda-0ec2-4a1a-d926-08d5c6d2086c X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2018 08:39:32.8115 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2375 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00837.txt.bz2 DQo+IE9uIDMwIE1heSAyMDE4LCBhdCAyMzo1MywgSm9lbCBCcm9iZWNrZXIg PGJyb2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IHRvIGZpeCBib3RoDQpvZiB0 aG9zZSBmb3IgOC4zDQoNCkFsYW4u >From gdb-patches-return-147819-listarch-gdb-patches=sources.redhat.com@sourceware.org Thu May 31 08:59:58 2018 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 95915 invoked by alias); 31 May 2018 08:59:57 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 95899 invoked by uid 89); 31 May 2018 08:59:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:may, H*r:forged, y* X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 May 2018 08:59:53 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [IPv6:2001:718:2:2901:0:0:0:238] (may be forged)) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id w4V8xiqR065870 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 31 May 2018 10:59:45 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Received: from localhost (0279192e.bb.sky.com [2.121.25.46] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id w4V8xfh4073778 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 31 May 2018 10:59:43 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) From: Jan Vrany To: gdb-patches@sourceware.org Cc: Jan Vrany Subject: [PATCH v2] Notify about breakpoint modification when enabling/disabling single location Date: Thu, 31 May 2018 09:35:00 -0000 Message-Id: <20180531085633.7830-1-jan.vrany@fit.cvut.cz> X-SW-Source: 2018-05/txt/msg00838.txt.bz2 Content-length: 5538 When a single breakpoint location enableness was modified by a CLI command, observers were not notified about it. This issue is now fixed. gdb/ChangeLog: * breakpoint.c (enable_disable_bp_num_loc): Notify observers. gdb/testsuite/ChangeLog: * gdb.mi/mi-breakpoint-location-ena-dis.cc: New file. * gdb.mi/mi-breakpoint-location-ena-dis.exp: New file. --- gdb/ChangeLog | 4 ++ gdb/breakpoint.c | 2 + gdb/testsuite/ChangeLog | 5 ++ .../gdb.mi/mi-breakpoint-location-ena-dis.cc | 36 ++++++++++++ .../gdb.mi/mi-breakpoint-location-ena-dis.exp | 56 +++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.cc create mode 100644 gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.exp diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c38ff5b14a..17ae4c625a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-05-29 Jan Vrany + + * breakpoint.c (enable_disable_bp_num_loc): Notify observers. + 2018-05-30 Pedro Alves * common/common-exceptions.h (exception_rethrow): Use diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f3101af96f..2243ba34f2 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -14215,6 +14215,8 @@ enable_disable_bp_num_loc (int bp_num, int loc_num, bool enable) target_disable_tracepoint (loc); } update_global_location_list (UGLL_DONT_INSERT); + + gdb::observers::breakpoint_modified.notify (loc->owner); } /* Enable or disable a range of breakpoint locations. BP_NUM is the diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b2938b1bf1..4ee5bb0662 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-05-29 Jan Vrany + + * gdb.mi/mi-breakpoint-location-ena-dis.cc: New file. + * gdb.mi/mi-breakpoint-location-ena-dis.exp: New file. + 2018-05-24 Andrew Burgess PR gdb/23203 diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.cc b/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.cc new file mode 100644 index 0000000000..981fbc8d82 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.cc @@ -0,0 +1,36 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2018 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +static int +add (int a, int b) +{ + return a + b; +} + +static double +add (double a, double b) +{ + return a + b; +} + +int +main (void) +{ + int i = add (3, 4); + double d = add (3.0, 4.0); + return 1; +} diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.exp new file mode 100644 index 0000000000..03e03d2365 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-location-ena-dis.exp @@ -0,0 +1,56 @@ +# Copyright 2018 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Tests whether =breakpoint=modified notification is sent when a single +# breakpoint location is enabled or disabled via CLI. + +load_lib mi-support.exp +set MIFLAGS "-i=mi" + +gdb_exit +if {[mi_gdb_start]} { + continue +} + +# +# Start here +# +standard_testfile .cc + +if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug c++}] != "" } { + return -1 +} + +mi_run_to_main + +mi_gdb_test "break add" \ + {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-created,bkpt=\{number="2",type="breakpoint".*\},\{number="2.1",enabled="y".*\}.*\n\^done} \ + "break add" + +# Modify enableness through MI commands shouldn't trigger MI +# notification. +mi_gdb_test "-break-disable 2.2" "\\^done" "-break-disable 2.2" +mi_gdb_test "-break-enable 2.2" "\\^done" "-break-enable 2.2" + +# Modify enableness through CLI commands should trigger MI +# notification. +mi_gdb_test "dis 2.2" \ + {.*=breakpoint-modified,bkpt=\{number="2",type="breakpoint".*\},\{number="2.1",enabled="y".*\},\{number="2.2",enabled="n".*\}.*\n\^done} \ + "dis 2.2" +mi_gdb_test "en 2.2" \ + {.*=breakpoint-modified,bkpt=\{number="2",type="breakpoint".*\},\{number="2.1",enabled="y".*\},\{number="2.2",enabled="y".*\}.*\n\^done} \ + "en 2.2" + +mi_gdb_exit -- 2.17.0