From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5402 invoked by alias); 26 Jun 2008 18:57:06 -0000 Received: (qmail 5394 invoked by uid 22791); 26 Jun 2008 18:57:05 -0000 X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jun 2008 18:56:48 +0000 Received: by yx-out-1718.google.com with SMTP id 6so87085yxn.48 for ; Thu, 26 Jun 2008 11:56:46 -0700 (PDT) Received: by 10.151.99.17 with SMTP id b17mr566714ybm.212.1214506605992; Thu, 26 Jun 2008 11:56:45 -0700 (PDT) Received: by 10.150.52.19 with HTTP; Thu, 26 Jun 2008 11:56:45 -0700 (PDT) Message-ID: <7611a2ff0806261156x3b6dd54cv880129c0be194e06@mail.gmail.com> Date: Thu, 26 Jun 2008 18:57:00 -0000 From: "Pavel Chernikov" To: "Michael Snyder" Subject: Re: gdb / dbx / pstack question - getting function argument addresses from stack Cc: "Joel Brobecker" , gdb@sourceware.org In-Reply-To: <1214506032.3601.1375.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> 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/msg00285.txt.bz2 Right, understood - thanks for pointing that out to me. I should have mentioned that the original platform was SPARC Solaris and the new platform is I386 Linux. 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? Ideally, I'd like to write the following solution in C: * List all function calls with corresponding function argument list for each function Thanks, -Pavel On Thu, Jun 26, 2008 at 2:47 PM, Michael Snyder wrote: > On Thu, 2008-06-26 at 14:08 -0400, Pavel Chernikov wrote: >> > (gdb) print /x $i0 >> > $1 = 0xfeedface >> >> As you've mentioned previously, this only works on Solaris. Am I >> totally out of luck on Linux? > > It only works on *sparc*. > > You would be just as out of luck on i386-solaris, but > you could do the same trick on sparc-linux. > > Intel is a very different architecture, you know: > there is not such a simple way of guessing where > all the function arguments are stored. > > > >