From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: tromey@redhat.com (Tom Tromey)
Cc: swagiaal@redhat.com (sami wagiaalla), gdb-patches@sourceware.org
Subject: Re: [patch] smart pointer support
Date: Sun, 08 Aug 2010 15:01:00 -0000 [thread overview]
Message-ID: <201008081501.o78F18sq011585@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <m37hk3tzsn.fsf@fleche.redhat.com> from "Tom Tromey" at Aug 06, 2010 11:29:44 AM
Tom Tromey wrote:
> Along these lines, I'm curious to know why value_must_coerce_to_target
> returns 0 for TYPE_CODE_STRUCT. Maybe that is just an oversight?
> Perhaps it should also check for lval_internalvar_component?
Well, I guess this is because the value-coerce-to-target mechanism was
introduced by Dan for a specific purpose, that is to allow lazy handling
of GDB-internally generated literal values (in particular string constants).
It was never intended to handle pushing arbitrary non-lvalues, like those
generated from inferior calls (or arbitray value arithmetic) to the target.
Now maybe this could be extended to do so; but it seems we'd have to carefully
think about exactly when we want this to happen. For example, if you have
a variable residing in a register, you currently cannot take its address in
GDB. If value_coerce_to_target were to blindly push *everything* to the
target, this would succeed, and you'd have a pointer to a malloc'ed location
holding a copy of the register value -- which is presumably not what you
intended ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2010-08-08 15:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 15:58 sami wagiaalla
2010-07-23 23:37 ` Tom Tromey
2010-08-05 18:46 ` sami wagiaalla
2010-08-05 22:57 ` Ulrich Weigand
2010-08-06 16:23 ` sami wagiaalla
2010-08-06 16:48 ` Ulrich Weigand
2010-08-06 17:29 ` Tom Tromey
2010-08-08 15:01 ` Ulrich Weigand [this message]
2010-08-06 21:33 ` sami wagiaalla
2010-08-06 22:20 ` Tom Tromey
2010-08-09 15:59 ` sami wagiaalla
2010-08-09 17:35 ` Tom Tromey
2010-08-09 18:04 ` sami wagiaalla
2010-08-09 18:23 ` Jan Kratochvil
2010-08-16 20:31 ` sami wagiaalla
2010-08-16 20:59 ` Pedro Alves
2010-08-17 16:16 ` sami wagiaalla
2010-08-17 17:15 ` Tom Tromey
2010-10-19 20:55 ` sami wagiaalla
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=201008081501.o78F18sq011585@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=swagiaal@redhat.com \
--cc=tromey@redhat.com \
/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).