From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5017 invoked by alias); 15 May 2012 06:51:25 -0000 Received: (qmail 4988 invoked by uid 22791); 15 May 2012 06:51:22 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 May 2012 06:51:04 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SUBb5-0003dw-PB from Yao_Qi@mentor.com ; Mon, 14 May 2012 23:51:03 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 May 2012 23:51:03 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Mon, 14 May 2012 23:51:02 -0700 Message-ID: <4FB1FCD2.5070302@codesourcery.com> Date: Tue, 15 May 2012 06:51:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: , 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> <20120503011435.GA3294@adacore.com> <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> In-Reply-To: <20120514171453.GL10253@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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-05/txt/msg00555.txt.bz2 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. -- Yao (齐尧)