This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]