From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16009 invoked by alias); 6 Jan 2006 22:59:04 -0000 Received: (qmail 16002 invoked by uid 22791); 6 Jan 2006 22:59:04 -0000 X-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from gateway.sf.frob.com (HELO gateway.sf.frob.com) (64.81.54.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Jan 2006 22:59:00 +0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 1F8DD357B; Fri, 6 Jan 2006 14:58:57 -0800 (PST) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id E27E2180B7C; Fri, 6 Jan 2006 14:58:56 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Jim Keniston Cc: SystemTAP Subject: Re: function parameter access in kretprobe handler In-Reply-To: Jim Keniston's message of , 6 January 2006 13:34:58 -0800 <1136583298.2849.33.camel@dyn9047018079.beaverton.ibm.com> X-Shopping-List: (1) Didactic surreptitious aspersions (2) Gracious porno (3) Libelous gregarious eggplants Message-Id: <20060106225856.E27E2180B7C@magilla.sf.frob.com> Date: Fri, 06 Jan 2006 22:59:00 -0000 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00054.txt.bz2 > Frank was lukewarm regarding this idea, I think mostly because DWARF can > tell you how to find arg values at the end of the function prolog, but > not right at entry to the function: > http://sourceware.org/ml/systemtap/2005-q3/msg00599.html This is the case with older compilers and due to bugs perhaps still the case in gcc 4.0.x. At least as of gcc 4.1, we think that the DWARF info is correct throughout the prologue and epilogue regions. But this is indeed a problem for practical needs today. > Finding the arg values on function entry is theoretically very > straightforward -- each architecture's ABI spells it out -- except that > for some architectures, declarations such as fastcall and asmlinkage map > to regparm attributes that alter where args are passed. And it's my > understanding that DWARF doesn't provide a function's regparm value. That is all correct. We may well extend the DWARF info in future to indicate the calling convention selection, but so far it is not knowable after compile time. Thanks, Roland