[PATCH 0/2] Make chained function calls in expressions work
Ulrich Weigand
uweigand@de.ibm.com
Thu Oct 23 16:09:00 GMT 2014
Siva Chandra wrote:
> Restricting to just those values whose address is returned in a hidden
> param (per ABI) is OK, but an implementation detail made me to include
> all types of return values. There are two times when a return value's
> address is required:
>
> 1. When a method is invoked on the return value: GDB has to evaluate
> the 'this' pointer. This is done in eval.c.
Ah, I knew there was something else I was missing :-)
In this case, I agree with the rest of your explanation. Please add a
comment in the final version of the patch that explains why the extra
copy is necessary.
There's just one minor change I think would be good: can we allocate that
extra copy on the stack at least only for *class* types, then? I'd prefer
to avoid this for the common case of routines just returning a scalar.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list