From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re: MIPS saved register troubles
Date: Mon, 26 Jan 2004 17:14:00 -0000 [thread overview]
Message-ID: <20040126171415.GA4860@nevyn.them.org> (raw)
In-Reply-To: <4015493C.4010805@gnu.org>
On Mon, Jan 26, 2004 at 12:07:08PM -0500, Andrew Cagney wrote:
> >I spent some time fiddling with backtraces in an o32 application, using a
> >mips64-linux GDB, this morning. They don't work so well :) The basic
> >problem is the [0,NUM_REGS) hack. mips_register_raw_size reports that
> >register $28 is 8 bytes wide, so legacy_saved_regs_prev_register loads two
> >consecutive saved values into $28, and it looks like 0x7ffffe007ffffd8c
> >($s8
> >concatenated with $sp).
>
> Can you provide more details?
Sure. It turns out I was mistaken about [0,NUM_REGS) being directly
the problem - we were actually unwinding in [NUM_REGS, NUM_REGS * 2).
What happens is that legacy_saved_regs_prev_register copies
REGISTER_RAW_SIZE(regno) bytes from memory into the register cache.
When debugging an o32 binary with a mips64-configured GDB,
REGISTER_RAW_SIZE(90 + 28) is 8. But a normal o32 stack frame pushes 4
bytes per register. So the eight-byte copy gets this saved register
and the next one also.
> >Fixing this is going to be ugly. Andrew, I don't suppose you have a plan
> >to
> >migrate MIPS to the new frame code, thereby making all this go away?
>
> I'm not so sure? BTW, you can't miss my irregular MIPS cleanups. My
> current problem is:
> [regression] Internal error: pc 0x400b21 in read in psymtab, but not in
> symtab.
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1519
> look familar?
Not at all. Pertinent missing detail - does this show up with HEAD?
Or is HEAD broken for some other reason?
I don't have an IRIX system but I can probably get a sense of the
problem on mips64-linux. I'll take a look this week.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-01-26 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-26 15:56 Daniel Jacobowitz
2004-01-26 17:07 ` Andrew Cagney
2004-01-26 17:14 ` Daniel Jacobowitz [this message]
2004-01-26 18:25 ` Andrew Cagney
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=20040126171415.GA4860@nevyn.them.org \
--to=drow@mvista.com \
--cc=cagney@gnu.org \
--cc=gdb@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