From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4738 invoked by alias); 16 May 2012 15:31:57 -0000 Received: (qmail 4711 invoked by uid 22791); 16 May 2012 15:31:54 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 15:31:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5A8E61C6F61; Wed, 16 May 2012 11:31:25 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id saXtKBuG5L7d; Wed, 16 May 2012 11:31:25 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2A4781C6D6E; Wed, 16 May 2012 11:31:25 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D390F145616; Wed, 16 May 2012 08:31:13 -0700 (PDT) Date: Wed, 16 May 2012 15:31:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org, cltang@codesourcery.com Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p Message-ID: <20120516153113.GX10253@adacore.com> References: <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> <20120515150132.GR10253@adacore.com> <4FB304B3.4080806@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB304B3.4080806@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00610.txt.bz2 > My original words are "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". The "same" means compiler doesn't generate DIE for the > hidden parameter, so it is the same on the targets having hidden > parameter passed and the targets not having hidden parameter passed. I was confusing the nameless, artificial, DIE that's generated as one of the parameters of the subroutine as the DIE associated to that hidden parameters. What's that nameless+artificial parameter DIE, then? Talking to Tom on IRC, he reminded me that this issue is something ABI-related, and thus wouldn't show up in DWARF debug info. Your last email seems to indicate that this would be correct. Now, because I don't know the C++ ABI at all, I don't know whether it is expected that some architectures would have a hidden parameter for the return value, while some don't. Is that allowed? Regardless, it sounds like a gdbarch method would the logical approach... If that is the case, I'd rather someone with more knowledge with C++ did the actual review, because I wouldn't be able to say whether the implementation makes sense or not. -- Joel