public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb unable to print fn argument correctly
Date: Thu, 21 Jul 2005 20:10:00 -0000	[thread overview]
Message-ID: <20050721201010.GA18155@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0507211343470.620@lazy>

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

  reply	other threads:[~2005-07-21 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21 20:06 Manoj Iyer
2005-07-21 20:10 ` Daniel Jacobowitz [this message]
2005-07-21 22:55   ` Manoj Iyer
2005-07-21 22:59     ` Daniel Jacobowitz
2005-07-26 18:44       ` Manoj Iyer
2005-07-27 18:10         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050721201010.GA18155@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=manjo@austin.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).