This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4] Make chained function calls in expressions work
- From: Siva Chandra <sivachandra at google dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 11 Nov 2014 09:05:45 -0800
- Subject: Re: [PATCH v4] Make chained function calls in expressions work
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gw_eN_zCV2hAC9onA-r8tFi36RN-L1abHfn334zD4q4Zw at mail dot gmail dot com> <201411111521 dot sABFLAQ5008463 at d03av02 dot boulder dot ibm dot com>
On Tue, Nov 11, 2014 at 7:21 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> No, please go ahead and ask questions; it's always better to hash the
> main direction out before spending a lot of time on implementating
> something ... :-)
This time I am really done :)
Thanks for taking time to explain things to me. I am just putting down
my point of view as to why I am still looking for the correct
approach, and after all your explanations, I am now convinced that the
thread approach is the best. One other place where chained function
calls can happen is in Python for example. If val1, val2 and val3 are
gdb.Value objects of type std::string, and if we have val1 + val2 in
Python code, then overloaded operator+ is invoked. However, if we have
val1 + val2 + val3, it will fail currently as this is also a chained
function call. We could perhaps do the 'setup' and 'cleanup' in
ensure_python_env as well (just as we want to do in
evaluate_expression or evaluate_subexp). I do not want to hold up the
current work in relation to this. We can discuss this probably as a
separate topic.