From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 510 invoked by alias); 26 Jun 2008 18:47:32 -0000 Received: (qmail 501 invoked by uid 22791); 26 Jun 2008 18:47:31 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jun 2008 18:47:14 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id F30493C29F; Thu, 26 Jun 2008 11:47:12 -0700 (PDT) Subject: Re: gdb / dbx / pstack question - getting function argument addresses from stack From: Michael Snyder To: Pavel Chernikov Cc: Joel Brobecker , gdb@sourceware.org In-Reply-To: <7611a2ff0806261108o1855655cp7705418469e8bdf5@mail.gmail.com> References: <7611a2ff0806260620k4e4f6765l6a306c7e363fa12e@mail.gmail.com> <20080626142633.GB3595@adacore.com> <7611a2ff0806260803q226a05f8s833d9907d42e589c@mail.gmail.com> <20080626162449.GF3595@adacore.com> <7611a2ff0806261108o1855655cp7705418469e8bdf5@mail.gmail.com> Content-Type: text/plain Date: Thu, 26 Jun 2008 18:47:00 -0000 Message-Id: <1214506032.3601.1375.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00283.txt.bz2 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.