This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] smart pointer support
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: swagiaal at redhat dot com (sami wagiaalla)
- Cc: gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Fri, 6 Aug 2010 00:57:36 +0200 (CEST)
- Subject: Re: [patch] smart pointer support
sami wagiaalla wrote:
> * infcall.c (call_function_by_hand): Set VALUE_LVAL of the
> returned value to lval_memory.
> @@ -1026,6 +1026,7 @@ When the function is done executing, GDB will silently stop."),
> retval = allocate_value (values_type);
> gdbarch_return_value (gdbarch, value_type (function), values_type,
> retbuf, value_contents_raw (retval), NULL);
> + VALUE_LVAL (retval) = lval_memory;
> break;
This part looks broken. Setting VALUE_LVAL to lval_memory implies the
value actually *has* location information pointing to memory, that is
in particular, a memory address.
Since this value doesn't have that information, and in general it may
not even exist (function return values may be passed in registers), I
don't see how this can be valid here.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com