From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23490 invoked by alias); 21 Jul 2005 20:10:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23479 invoked by uid 22791); 21 Jul 2005 20:10:12 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 21 Jul 2005 20:10:12 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1DvhMw-0004jf-7r; Thu, 21 Jul 2005 16:10:10 -0400 Date: Thu, 21 Jul 2005 20:10:00 -0000 From: Daniel Jacobowitz To: Manoj Iyer Cc: gdb@sources.redhat.com Subject: Re: gdb unable to print fn argument correctly Message-ID: <20050721201010.GA18155@nevyn.them.org> Mail-Followup-To: Manoj Iyer , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00218.txt.bz2 On Thu, Jul 21, 2005 at 02:40:23PM -0500, Manoj Iyer wrote: > > I have an test program which has a function of the nature 'void fn(double > c){}', which is compiled as a PwerPC 64bit application. When I set a > breakpoint and stop on this function, GDB is not printing the arguments > passed to this function correctly. > > I did some initial debugging, the dwarf information and dissassembly of > the function looks good to me. But I am not able to pin point who is > corrupting the stack. I believe gdb is just printing what is avaiable in > the stack to output. > > Any pointers to help me identify the culprit deeply appreciated. Check what instruction ($pc) GDB has stopped on. The debug info is valid only at or after 0x10000458. What does the line table look like? > ==== Disassembly of void fn3(double c){} ======================= > fn3() > [5] 10000448: 94 21 ff e0 stwu r1, -32(r1) > 1000044c: 93 e1 00 1c stw r31, 28(r1) > 10000450: 7c 3f 0b 78 mr r31, r1 > 10000454: d8 3f 00 08 stfd fr1, 8(r31) > 10000458: 81 61 00 00 lwz r11, 0(r1) > 1000045c: 83 eb ff fc lwz r31, -4(r11) > 10000460: 7d 61 5b 78 mr r1, r11 > 10000464: 4e 80 00 20 blr > ================================================================== -- Daniel Jacobowitz CodeSourcery, LLC