This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] -var-update
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nick Roberts <nickrob at snap dot net dot nz>
- Cc: Vladimir Prus <ghost at cs dot msu dot su>, gdb-patches at sources dot redhat dot com
- Date: Sat, 20 May 2006 10:40:15 -0400
- Subject: Re: [PATCH] -var-update
- References: <17518.39336.538984.261434@kahikatea.snap.net.nz>
On Sat, May 20, 2006 at 04:23:04PM +1200, Nick Roberts wrote:
> > BTW, why coerce_ref is not suitable
> > here?
>
> coerce_ref ensures that the address is placed in the value's contents, not
> the actual value which is being referred to.
Did you try that? That certainly shouldn't be true!
struct value *
coerce_ref (struct value *arg)
{
struct type *value_type_arg_tmp = check_typedef (value_type (arg));
if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF)
arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp),
unpack_pointer (value_type (arg),
value_contents (arg)));
return arg;
}
--
Daniel Jacobowitz
CodeSourcery