From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103765 invoked by alias); 2 Aug 2016 20:29:25 -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 103745 invoked by uid 89); 2 Aug 2016 20:29:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=burgess, Burgess, chose, internal_error X-HELO: esa4.dell-outbound.iphmx.com Received: from Unknown (HELO esa4.dell-outbound.iphmx.com) (68.232.149.214) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 02 Aug 2016 20:29:14 +0000 Received: from mailuogwhop.emc.com ([168.159.213.141]) by esa4.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Aug 2016 01:29:07 +0500 Received: from maildlpprd06.lss.emc.com (maildlpprd06.lss.emc.com [10.253.24.38]) by mailuogwprd03.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u72KT4db013565 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 2 Aug 2016 16:29:06 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd03.lss.emc.com u72KT4db013565 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd03.lss.emc.com u72KT4db013565 Received: from mailusrhubprd04.lss.emc.com (mailusrhubprd04.lss.emc.com [10.253.24.22]) by maildlpprd06.lss.emc.com (RSA Interceptor); Tue, 2 Aug 2016 16:27:11 -0400 Received: from MXHUB222.corp.emc.com (MXHUB222.corp.emc.com [10.253.68.92]) by mailusrhubprd04.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u72KSweG008293 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=FAIL); Tue, 2 Aug 2016 16:28:59 -0400 Received: from MX203CL03.corp.emc.com ([fe80::4dee:b763:b476:8fbc]) by MXHUB222.corp.emc.com ([10.253.68.92]) with mapi id 14.03.0266.001; Tue, 2 Aug 2016 16:28:58 -0400 From: "taylor, david" To: Andrew Burgess CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] breakpoints / tracepoints and setting variables Date: Tue, 02 Aug 2016 20:29:00 -0000 Message-ID: <63F1AEE13FAE864586D589C671A6E18B06B3CE@MX203CL03.corp.emc.com> References: <14037.1468597161@usendtaylorx2l> <20160802113324.GF17743@embecosm.com> In-Reply-To: <20160802113324.GF17743@embecosm.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd04.lss.emc.com X-RSA-Classifications: public X-SW-Source: 2016-08/txt/msg00038.txt.bz2 > From: Andrew Burgess [mailto:andrew.burgess@embecosm.com] > Sent: Tuesday, August 02, 2016 7:33 AM > I'm not a maintainer, so can't approve your patch, however, I made a > few comments inline. Thanks. I am testing an updated patch that I believe addresses your issues with one exception --- see below. Assuming it passes with no regressions, Ill rebase it as one commit and post it. > Thanks, > Andrew >=20 >=20 > * David Taylor [2016-07-15 11:39:21 -0400]: > > diff --git a/gdb/ax-general.c b/gdb/ax-general.c > > index 7f27a45..5406ab8 100644 > > --- a/gdb/ax-general.c > > +++ b/gdb/ax-general.c > > @@ -323,6 +323,28 @@ ax_reg (struct agent_expr *x, int reg) > > } > > } > > > > +/* Assemble code to pop the top of stack and set register number REG > > + to its value. */ > > + > > +void > > +ax_setreg (struct agent_expr *x, int reg) > > +{ > > + if (reg >=3D gdbarch_num_regs (x->gdbarch)) > > + error (_("register number '%d' is a pseudo register or is out of r= ange"), > reg); > > + else > > + { > > + /* Make sure the register number is in range. */ > > + if (reg < 0 || reg > 0xffff) > > + error (_("GDB bug: ax-general.c (ax_reg): " > > + "register number out of range")); >=20 > If this indicates a GDB bug then you should switch to either > internal_error or gdb_assert. If you choose internal_error then you > can drop the 'GDB bug' prefix. If I counted correctly, there are 9 other, pre-existing, instances of error (_("GDB bug: ..." in the file ax-general -- which is why I chose to do this one that way. I can use internal_error if people feel that is better than consistency with rest of the file.