From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11482 invoked by alias); 26 Jun 2008 19:06:33 -0000 Received: (qmail 11474 invoked by uid 22791); 26 Jun 2008 19:06:32 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jun 2008 19:06:15 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B802F2A96A9; Thu, 26 Jun 2008 15:06:13 -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 zBeEXtddSOQp; Thu, 26 Jun 2008 15:06:13 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 841CE2A96A6; Thu, 26 Jun 2008 15:06:13 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4DB5CE7ACD; Thu, 26 Jun 2008 15:06:13 -0400 (EDT) Date: Thu, 26 Jun 2008 19:06:00 -0000 From: Joel Brobecker To: Pavel Chernikov Cc: Michael Snyder , gdb@sourceware.org Subject: Re: gdb / dbx / pstack question - getting function argument addresses from stack Message-ID: <20080626190613.GE8971@adacore.com> References: <7611a2ff0806260620k4e4f6765l6a306c7e363fa12e@mail.gmail.com> <20080626142633.GB3595@adacore.com> <7611a2ff0806260803q226a05f8s833d9907d42e589c@mail.gmail.com> <20080626162449.GF3595@adacore.com> <7611a2ff0806261108o1855655cp7705418469e8bdf5@mail.gmail.com> <1214506032.3601.1375.camel@localhost.localdomain> <7611a2ff0806261156x3b6dd54cv880129c0be194e06@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7611a2ff0806261156x3b6dd54cv880129c0be194e06@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00288.txt.bz2 > With that said, am I absolutely-totally-100% out of luck with being > able to find function argument addresses? Or is there some way of > doing this? What I would suggest is that you take a look at the i386 ABI (the document I have is named "SYSTEM V APPLICATION BINARY INTERFACE, Intel386 Architecture Processor Supplement, Fourth Edition"), in particular the section that explains how function calls are made. You'll see where the arguments are. That should give you an idea of some of the challenges that you'll have to solve to provide something comparable on x86. I would say that this is non-trivial if you want to make it work in the case of functions that don't use the frame base pointer... -- Joel