This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v6] 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: Fri, 28 Nov 2014 16:03:57 -0800
- Subject: Re: [PATCH v6] Make chained function calls in expressions work
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gxp5QS7t9C6WxG5pn2Wfzdtj6x2UJrsnD40PW6M7skZ5w at mail dot gmail dot com> <201411281210 dot sASCAQGP013169 at d03av02 dot boulder dot ibm dot com>
On Fri, Nov 28, 2014 at 4:10 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> Siva Chandra wrote:
>
>> gdb/ChangeLog:
>>
>> 2014-11-27 Siva Chandra Reddy <sivachandra@google.com>
>>
>> * eval.c: Include gdbthread.h.
>> (evaluate_subexp): Enable thread stack temporaries before
>> evaluating a complete expression and clean them up after the
>> evaluation is complete.
>> * gdbthread.h: Include common/vec.h.
>> (value_ptr): New typedef.
>> (VEC (value_ptr)): New vector type.
>> (value_vec): New typedef.
>> (struct thread_info): Add new fields stack_temporaries_enabled
>> and stack_temporaries.
>> (enable_thread_stack_temporaries)
>> (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
>> (get_last_thread_stack_temporary)
>> (value_in_thread_stack_temporaries): Declare.
>> * gdbtypes.c (class_or_union_p): New function.
>> * gdbtypes.h (class_or_union_p): Declare.
>> * infcall.c (call_function_by_hand): Store return values of class
>> type as temporaries on stack.
>> * thread.c (enable_thread_stack_temporaries): New function.
>> (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
>> (get_last_thread_stack_temporary): Likewise.
>> (value_in_thread_stack_temporaries): Likewise.
>> * value.c (value_force_lval): New function.
>> * value.h (value_force_lval): Declare.
>>
>> gdb/testsuite/ChangeLog:
>>
>> 2014-11-27 Siva Chandra Reddy <sivachandra@google.com>
>>
>> * gdb.cp/chained-calls.cc: New file.
>> * gdb.cp/chained-calls.exp: New file.
>> * gdb.cp/smartp.exp: Remove KFAIL for "p c2->inta".
>
> This is OK.
>
> Thanks for you patience in working through the many iterations on this patch!
Thanks for your patience with explaining things to me. I have now
pushed this patch after fixing the one comment:
6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a