From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32469 invoked by alias); 26 Jun 2008 19:11:47 -0000 Received: (qmail 32457 invoked by uid 22791); 26 Jun 2008 19:11:47 -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 19:11:29 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 1D4E63C286; Thu, 26 Jun 2008 12:11:28 -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: <7611a2ff0806261156x3b6dd54cv880129c0be194e06@mail.gmail.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> Content-Type: text/plain Date: Thu, 26 Jun 2008 19:11:00 -0000 Message-Id: <1214507487.3601.1387.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/msg00290.txt.bz2 On Thu, 2008-06-26 at 14:56 -0400, Pavel Chernikov wrote: > 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? The key constraint is "without debug info". Under that constraint you are pretty much out of luck. > Ideally, I'd like to write the following solution in C: > * List all function calls with corresponding function argument list > for each function That's exactly what debug info is for. With modern compiler abis and complex architectures like Intel, it's nominally-close-to-impossible to do that without debug info.