From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19586 invoked by alias); 16 May 2012 23:03:55 -0000 Received: (qmail 19526 invoked by uid 22791); 16 May 2012 23:03:54 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 23:03:32 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q4GN3M9d004171; Thu, 17 May 2012 01:03:22 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q4GN3JK4001896; Thu, 17 May 2012 01:03:19 +0200 (CEST) Date: Wed, 16 May 2012 23:03:00 -0000 Message-Id: <201205162303.q4GN3JK4001896@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: yao@codesourcery.com, gdb-patches@sourceware.org, cltang@codesourcery.com In-reply-to: <87zk97n8ve.fsf@fleche.redhat.com> (message from Tom Tromey on Wed, 16 May 2012 14:55:49 -0600) Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p References: <1334755073-26528-1-git-send-email-yao@codesourcery.com> <87zk97n8ve.fsf@fleche.redhat.com> 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 X-SW-Source: 2012-05/txt/msg00643.txt.bz2 > From: Tom Tromey > Date: Wed, 16 May 2012 14:55:49 -0600 > > >>>>> "Yao" == Yao Qi writes: > > Yao> Hi, this patch series is about fixing return values in C++ in GDB inf-call. > > Thanks. I read through the whole thread and dug into the code a bit as > well. I think your approach is fine. > > Yao> Unfortunately, GCC is not correct here. currently GCC processes > Yao> the return value RTL expanding like this, in > Yao> gcc/function.c:assign_parms_augmented_arg_list(): > > I suppose it would be nice to get some commitment on the GCC side to > declare this a non-bug, and part of the ABI. > > Yao> +int > Yao> +default_return_with_first_hidden_param_p (struct gdbarch *gdbarch, > Yao> + struct type *type) > > This could use an introductory comment, just explaining it is an > implementation suitable for use by such-and-such gdbarch method. > > Yao> +# Return true if the return value of function is stored in the first hidden parameter. > Yao> +# In theory, this feature should be language-dependent, specified by language and its ABI, > Yao> +# such as C++. Unfortunately, compiler may implement it to a target-dependent feature. > Yao> +# So that we need such hook here to be aware of this in GDB. > > Over-long lines. > > Ok with those fixes. If this hasn't been committed yet, please wait.