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

Siva Chandra
2014-11-03T14:35:49Z

On Sat, Oct 25, 2014 at 7:24 AM, Siva Chandra <sivachandra@google.com> wrote:
> This is a follow up to the thread here:
> https://sourceware.org/ml/gdb-patches/2014-10/msg00000.html
>
> I have made all the suggested changes which now eliminates the need
> for two patches in this set. The single patch is attached.
>
> gdb/ChangeLog:
>
> 2014-10-25 Siva Chandra Reddy <sivachandra@google.com>
>
> * eval.c (evaluate_expression): Cleanup stack mirrors that might
> have been created.
> (add_value_to_expression_stack, skip_current_expression_stack):
> New functions.
> * expression.h (struct expression): New field
> 'on_stack_temporaries_vec'.
> * gdbtypes.c (class_or_union_p): New function.
> * gdbtypes.h (class_or_union_p): Declare.
> * infcall.c (call_function_by_hand): New argument EXP of type
> struct expression *. Setup stack temporaries for return values of
> class type.
> (get_return_value_from_memory): New function.
> * infcall.h (call_function_by_hand): Update signature and all
> callers.
> * valarith.c (value_x_binop): New argument EXP of type
> struct expression *.
> (value_x_unop): Likewise.
> * value.c (write_value_to_memory): New function.
> (value_fetch_lazy): Fix its description comment.
> * value.h (add_value_to_expression_stack)
> (skip_current_expression_stack, write_value_to_memory): Declare.
> (value_x_binop, value_x_unop): Update signature and all callers.
>
> gdb/testsuite/ChangeLog:
>
> 2014-10-25 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 from c2->inta.

Ping.