From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15921 invoked by alias); 14 May 2012 17:15:17 -0000 Received: (qmail 15854 invoked by uid 22791); 14 May 2012 17:15:15 -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; Mon, 14 May 2012 17:15:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3917C1C66D0; Mon, 14 May 2012 13:15:02 -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 w9-syS9Mjq7T; Mon, 14 May 2012 13:15:02 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C3A681C67EF; Mon, 14 May 2012 13:15:01 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 8A0B6145616; Mon, 14 May 2012 10:14:53 -0700 (PDT) Date: Mon, 14 May 2012 17:15: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: <20120514171453.GL10253@adacore.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FACEB4B.1060603@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/msg00523.txt.bz2 > > 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? > Well, we have to compromise :) Could you please re-consider this patch > series, as it is a trade-off, and not perfect? > > If this patch series is still not acceptable, we may create a variant > (or sub-class) of gnu-v3-abi, say "gnu-v3-pass-implicit-param" or > something similar, for targets affected by this problem, and > `set_cp_abi_as_auto_default ("gnu-v3-pass-implicit-param")' in each > target backend. (This is my rough thought, and need some experiments to > see it works or not). Even, if GCC in the future starts to pass > implicit parameter for these ports, we can switch to gnu-v3, and users > just have to type `set cp-abi gnu-v3' without rebuilding their GDB. I'm not very familiar with the gnu-v3-abi... If we've explored all avenues with trying to use the debug info, I'm satisfied with the next best thing, which could possibly be your initial set of patches. I'd like someone else to be involved in the review, however, just to get someone else's opinion. -- Joel