From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16960 invoked by alias); 6 Jul 2012 13:17:23 -0000 Received: (qmail 16952 invoked by uid 22791); 6 Jul 2012 13:17:22 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Jul 2012 13:17:06 +0000 Date: Fri, 06 Jul 2012 13:17:00 -0000 From: Gary Benson To: Mark Kettenis Cc: yao@codesourcery.com, brobecker@adacore.com, gdb-patches@sourceware.org, cltang@codesourcery.com Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p Message-ID: <20120706131703.GB3056@redhat.com> Mail-Followup-To: Mark Kettenis , yao@codesourcery.com, brobecker@adacore.com, gdb-patches@sourceware.org, cltang@codesourcery.com References: <4FA22D7B.1040707@codesourcery.com> <20120504175830.GQ15555@adacore.com> <4FA743EC.1080903@codesourcery.com> <20120507201345.GX15555@adacore.com> <4FAA2D25.4060700@codesourcery.com> <20120510212054.GA5886@adacore.com> <4FACEB4B.1060603@codesourcery.com> <20120514171453.GL10253@adacore.com> <4FB1FCD2.5070302@codesourcery.com> <201205151802.q4FI2O2Y013475@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205151802.q4FI2O2Y013475@glazunov.sibelius.xs4all.nl> X-IsSubscribed: yes 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-07/txt/msg00089.txt.bz2 Hi Mark, Sorry for replying to this so late, I've been on leave with a new baby! Mark Kettenis wrote: > > Date: Tue, 15 May 2012 14:50:58 +0800 > > From: Yao Qi > > > > On 05/15/2012 01:14 AM, Joel Brobecker wrote: > > > > > > > Can we use the fact that functions that have their first > > > > > > > parameter be a nameless, artificial, paramter whose type > > > > > > > is a pointer to the return type? Or would this > > > > > > > heuristics trigger in other situations? > > > > > > > > > > Yeah, I thought of that heuristics, but it still can't > > > > > differentiate passing 3 or 4 parameters. > > > > > > So, you are saying that we have functions who have an extra > > > hidden parameter used for something other than the function's > > > return value? > > > > No, the extra hidden parameter's type is the reference of the > > function's return type. My point is if we only examine debug > > info, we don't know whether hidden parameter is passed, because > > the debug info is the same regardless of hidden parameter is > > passed or not. > > I'm still very confused. This "hidden parameter" thing sounds > exactly like "struct_return". So are you saying that on some > architectures gdbarch_return_value() return > RETUN_VALUE_REGISTER_CONVENTION when if fact for C++ (and not for > plain C) it should return RETURN_VALUE_STRUCT_CONVENTION? I've been investigating a bug which looks like this might be happening: http://sourceware.org/bugzilla/show_bug.cgi?id=13403 I meant to email you about it before I went on leave, I was struggling to match what it says in the comments with what I was reading in the spec. I don't have anything particular to say right now--I'm still trying to figure out where I was--but I'm replying now just to let you know that there may be an issue here. I'll hopefully have something more useful to say next week :) Thanks, Gary -- http://gbenson.net/