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.