Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] pb unwinding from pthread_cond_wait on ppc-linux (RFA?)
Date: Wed, 08 Dec 2004 16:34:00 -0000	[thread overview]
Message-ID: <20041208163211.GY2524@adacore.com> (raw)
In-Reply-To: <20041208161420.GA29978@nevyn.them.org>

> > I think that the reason that gdb-6.0 worked is a bit related to luck.
> > Here are the first few instructions of pthread_cond_timedwait():
> > 
> >     0x0ffe45b4 <pthread_cond_timedwait+0>:     stwu    r1,-128(r1)
> >     0x0ffe45b8 <pthread_cond_timedwait+4>:     mflr    r8
> >     0x0ffe45bc <pthread_cond_timedwait+8>:     lis     r7,15258
> >     0x0ffe45c0 <pthread_cond_timedwait+12>:    bl      0xffed01c
> >     0x0ffe45c4 <pthread_cond_timedwait+16>:    stw     r8,132(r1)
> 
> What's the bl actually calling?

(strange that the information appears to have gotten lost somewhere
during the copy/paste). According to GDB:

        bl      0xffed01c <stack_used+8>

But then, when I try to look deeper:

        (gdb) disass &stack_used
        Dump of assembler code for function stack_used:
        0x0ffed014 <stack_used+0>:      addic   r2,r2,-5280
        0x0ffed018 <stack_used+4>:      addic   r2,r2,-5280
        End of assembler dump.

ie, stack_used+8 does not exist... However:

        (gdb) x /10i 0xffed01c
        0xffed01c <stack_used+8>:       blrl
        0xffed020 <stack_used+12>:      .long 0x10f10
        0xffed024 <stack_used+16>:      .long 0x0
        0xffed028 <stack_used+20>:      .long 0x0
        0xffed02c <stack_used+24>:      twi     31,r30,-12756
        0xffed030 <stack_used+28>:      twi     31,r30,1928
        0xffed034 <stack_used+32>:      twi     31,r30,-24472
        0xffed038 <stack_used+36>:      twi     31,r30,-12280
        0xffed03c <stack_used+40>:      twi     31,r30,-11904
        0xffed040 <stack_used+44>:      twi     31,r30,-12276

Gah? Do I understand correctly that the code jumps to 0xffed01c
only to return back?

-- 
Joel


  reply	other threads:[~2004-12-08 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08 15:59 Joel Brobecker
2004-12-08 16:32 ` Daniel Jacobowitz
2004-12-08 16:34   ` Joel Brobecker [this message]
2004-12-08 16:51     ` Daniel Jacobowitz
2004-12-09 17:23       ` Joel Brobecker
2005-02-09 17:08         ` Joel Brobecker
2005-06-17  4:07           ` Daniel Jacobowitz
2006-10-11 16:03             ` Joel Brobecker

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=20041208163211.GY2524@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sources.redhat.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