public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: David Taylor <dtaylor@emc.com>
Cc: Stan Shebs <stanshebs@earthlink.net>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: two agent expression nits (one line each)
Date: Sat, 20 Dec 2014 17:19:00 -0000	[thread overview]
Message-ID: <20141220171955.GG12884@adacore.com> (raw)
In-Reply-To: <23074.1418658035@usendtaylorx2l>

Hi David,

> > Would you mind taking care of that for us? I kept that message around
> > in the hope that I'd have a clearer picture with a little extra time,
> > but I am still not sure whether you're just suggesting a documentation
> > fix, or if you're saying we should fix the implementation...
> 
> The first part is pure documentation -- the description is correct but
> the summary line is wrong.  The second part is implementation -- the
> consumed and produced fields are used to check for stack underflow and
> overflow.
> 
> The fields are used by gdb and gdbserver for sanity checking the
> bytecode expression -- checking for underflow and overflow.
> 
> The underflow check catches bad bytecode sequences generated by GDB.
> 
> Since DEFOP has consumed as 0 when it is really 1, that means that GDB
> will think that there is more on the stack than there really is.
> 
> So, if GDB generates a bytecode sequence that underflows it might not
> catch it.  It does not currently generate bad sequences, so fixing it
> will merely help catch future lossage.
> 
> As I recall, the overflow check is used by gdbserver to verify that it
> has sufficent stack space for the expression.  The bad DEFOP line makes
> it think that the expression is using one more stack slot than reality.
> But, gdbserver has fairly generous bytecode stack space -- so unless the
> expression is really complicated, that won't happen.

Since you understand what should be done, would you mind sending
a patch in for Stan to review?

-- 
Joel

  reply	other threads:[~2014-12-20 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 17:54 David Taylor
2014-11-23  3:27 ` Joel Brobecker
2014-12-02 20:45 ` Stan Shebs
2014-12-13 13:44   ` Joel Brobecker
2014-12-15 15:41     ` David Taylor
2014-12-20 17:19       ` Joel Brobecker [this message]
2015-02-03 21:58         ` David Taylor
2015-02-11  7:49           ` Joel Brobecker
2015-02-11 17:28           ` Stan Shebs
2015-02-13 19:21             ` David Taylor
2015-02-20  3:05               ` pushed (master+branch): " Joel Brobecker

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=20141220171955.GG12884@adacore.com \
    --to=brobecker@adacore.com \
    --cc=dtaylor@emc.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stanshebs@earthlink.net \
    /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).