Re: [PATCH v4] Make chained function calls in expressions work

Doug Evans
2014-11-12T16:08:58Z

On Tue, Nov 11, 2014 at 7:21 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> [...]
> The most cleanly "correct" solution would probably be to cache the temporaries
> on the *dummy frame*, because that is the frame associated with all the
> GDB-generated content on the stack, and the dummy_frame struct does persist
> a bit longer than the frame struct. However, getting there would still be
> a bit more difficult, since we'd first have to arrange for a dummy frame to
> persist over multiple inferior call invocations. Currently, the dummy frame
> is automatically popped in infrun as soon as the call returns.

Hi.
OOC, Could one do a quick pass over the parsed expression to first see
if there are any function calls, and if so wrap the entire expression
evaluation in a routine that manages the creation/cleanup of an
"outer" dummy frame?

One catch is that if all calls end up being xmethod calls then we
won't need the dummy frame.
I'm not sure if there'd be any real harm in setting one up though.