From: "taylor, david" <david.taylor@emc.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] breakpoints / tracepoints and setting variables
Date: Tue, 02 Aug 2016 20:29:00 -0000 [thread overview]
Message-ID: <63F1AEE13FAE864586D589C671A6E18B06B3CE@MX203CL03.corp.emc.com> (raw)
In-Reply-To: <20160802113324.GF17743@embecosm.com>
> 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
>
>
> * David Taylor <dtaylor@emc.com> [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 >= gdbarch_num_regs (x->gdbarch))
> > + error (_("register number '%d' is a pseudo register or is out of range"),
> 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"));
>
> 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.
next prev parent reply other threads:[~2016-08-02 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 15:39 David Taylor
2016-07-15 16:56 ` taylor, david
2016-08-02 11:33 ` Andrew Burgess
2016-08-02 20:29 ` taylor, david [this message]
2016-08-05 19:46 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63F1AEE13FAE864586D589C671A6E18B06B3CE@MX203CL03.corp.emc.com \
--to=david.taylor@emc.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).