From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2252 invoked by alias); 28 Nov 2014 12:10:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2241 invoked by uid 89); 28 Nov 2014 12:10:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e32.co.us.ibm.com Received: from e32.co.us.ibm.com (HELO e32.co.us.ibm.com) (32.97.110.150) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 28 Nov 2014 12:10:32 +0000 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Nov 2014 05:10:30 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 28 Nov 2014 05:10:29 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 28C8E1FF003B for ; Fri, 28 Nov 2014 04:59:13 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sASC9YuG19595512 for ; Fri, 28 Nov 2014 05:09:34 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sASCARRk013344 for ; Fri, 28 Nov 2014 05:10:28 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id sASCAQGP013169; Fri, 28 Nov 2014 05:10:26 -0700 Message-Id: <201411281210.sASCAQGP013169@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 28 Nov 2014 13:10:25 +0100 Subject: Re: [PATCH v6] Make chained function calls in expressions work To: sivachandra@google.com (Siva Chandra) Date: Fri, 28 Nov 2014 12:10:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (gdb-patches) In-Reply-To: from "Siva Chandra" at Nov 26, 2014 10:55:44 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112812-0005-0000-0000-000006B15E93 X-SW-Source: 2014-11/txt/msg00698.txt.bz2 Siva Chandra wrote: > gdb/ChangeLog: > > 2014-11-27 Siva Chandra Reddy > > * 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 > > * 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! One final nit: >+/* Return an address after skipping over the current stack temporaries >+ of thread with id PTID. SP is the current stack frame pointer. Non-zero >+ DOWNWARD indicates that the stack grows downwards/backwards. */ >+ >+struct value * >+get_last_thread_stack_temporary (ptid_t ptid) Comment no longer fits the new semantics of the function. Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com