From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com, Nick Roberts <nickrob@snap.net.nz>
Subject: Re: MI/C++/references fixup
Date: Wed, 29 Nov 2006 14:15:00 -0000 [thread overview]
Message-ID: <200611291715.05247.vladimir@codesourcery.com> (raw)
In-Reply-To: <20061129140117.GB29365@nevyn.them.org>
On Wednesday 29 November 2006 17:01, Daniel Jacobowitz wrote:
> On Wed, Nov 29, 2006 at 12:15:21PM +0300, Vladimir Prus wrote:
> > We discussed this at length some time ago:
> >
> > http://thread.gmane.org/gmane.comp.gdb.patches/28414/
> >
> > The conclusion was that this "address prefix" is not necessary. In fact,
> > both KDevelop and Eclipse explicitly remove it. Back then, it was decided
> > that change would be hard. But recent varobj refactorings make this
> > change straight-forward.
>
> Did we? I believe you, but I can't find it in the thread, and I don't
> remember.
The last thing I remember from this thread is that we tried, but failed.
> > + /* We are not interested in address of references, and given
> > + that in C++ reference is not rebindable, it cannot
> > + meaningfully change. So, get hold of the real value. */
>
> in the address of a reference, in C++ a reference.
>
> In C++ it can't meaningfully change. In a program, though, it can;
> once when it's initialized, and again if something scribbles on the
> stack. And that might be what you're trying to debug. So, I'm
> a little wary of this; it seems to me that we ought to check for both
> changes in the address and value (sort of like we do for watchpoints).
In practice, if the address changes, the value also changes, so the user can
notice. Second, if user really wants to get the address, he can do that
with "&whatever".
Finally, what's the point of displaying address, if Eclipse and KDevelop strip
it, and I think Nick wants it to be gone too?
>
> Per your other message, I'd rather not check in the patch without this;
> want me to try it?
>
> > mi_gdb_test "200-break-insert $func" \
> > -
> > "200\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"keep\",
> >enabled=\"y\",addr=\"$hex\",func=\"$func\",file=\".*\",line=\"\[0-9\]*\",t
> >imes=\"0\"\}" \ +
> > "200\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"keep\",
> >enabled=\"y\",addr=\"$hex\",func=\"$func\(\\\(\\\)\)?\",file=\".*\",line=\
> >"\[0-9\]*\",times=\"0\"\}" \ "breakpoint at $func"
>
> Probably ought to allow (.*) for the function in case it has arguments
> (or the C++ demangler gives us back a (void)).
Okay.
> > +proc mi_check_varobj_value { name value } {
> > +
> > + mi_gdb_test "-var-evaluate-expression $name" \
> > + "\\^done,value=\"$value\"" \
> > + "-var-evaluate-expression $name: expect $value"
> > +}
> > \ No newline at end of file
>
> Please add newline :-)
>
> > # Copyright 2002, 2003 Free Software Foundation, Inc.
>
> And update copyright years.
>
> > # Please email any bugs, comments, and/or additions to this file to:
> > # bug-gdb@prep.ai.mit.edu
>
> And skip that. We really should remove it from every file.
>
> And copyright message on new tests please.
Okay.
- Volodya
next prev parent reply other threads:[~2006-11-29 14:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 9:15 Vladimir Prus
2006-11-29 9:25 ` Vladimir Prus
2006-11-29 14:01 ` Daniel Jacobowitz
2006-11-29 14:15 ` Vladimir Prus [this message]
2006-11-29 14:24 ` Daniel Jacobowitz
2006-11-29 14:41 ` Vladimir Prus
2006-11-29 23:59 ` Nick Roberts
2006-11-30 7:31 ` Vladimir Prus
2006-12-05 21:11 ` Daniel Jacobowitz
2006-12-06 9:17 ` Vladimir Prus
2006-12-07 14:39 ` Daniel Jacobowitz
2006-12-08 12:45 ` Vladimir Prus
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=200611291715.05247.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
--cc=nickrob@snap.net.nz \
/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