From: Daniel Jacobowitz <drow@mvista.com>
To: Don Bowman <don@sandvine.com>
Cc: "'gdb@sources.redhat.com'" <gdb@sources.redhat.com>
Subject: Re: MIPS stack tracing
Date: Fri, 01 Feb 2002 09:37:00 -0000 [thread overview]
Message-ID: <20020201123707.A28873@nevyn.them.org> (raw)
In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C853371BC1AF@mail.sandvine.com>
On Thu, Jan 31, 2002 at 05:27:30PM -0500, Don Bowman wrote:
>
> The MIPS / vxworks stack tracing has always been fairly weak
> in gdb I've found. However, now with the 3.0.3 gdb, it
> is quite broken.
>
> The problem is that the compiler emits multiple returns
> per function. The algorithm gdb follows is that specified
> by the SYSV ABI (which the compiler is breaking). I looked
> into fixing the compiler, but gave up in the short term.
> In desperation I added a magic instruction (break 4) in the
> epilogue of each function (by modifying gcc). This allowed
> me to fix my VxWorks task trace (tt).
>
> Now, before I launch into fixing the gdb MIPS stack tracing
> code up, I thought I'd ask a few questions. I'd like to
> do it by using the symbols to find the start of each function,
> instead of by the heuristic of walking in the code. That
> would be much faster for me (I'm on an embedded platform,
> and its slow to walk the memory over the link). It would also
> be deterministic. The downside is that the stack trace won't
> work without a symbol file. Is that OK?
> The alternative is I can add support for walking to find
> my magic instruction. This isn't standard.
> The only other alternative I can see is to fix gcc up
> to not emit multiple returns. This seems to be difficult to
> add as a constraint.
>
> Does anyone have any suggestions on a course of action
> for me to take?
I'd like to understand - and have documented somewhere - what it is
about MIPS besides the somewhat-variable frame register that makes
backtracing so much more complex. Also, IMHO, if we have symbol
information to find the start of the function we should certainly use
it.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-02-01 17:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 14:27 Don Bowman
2002-02-01 9:37 ` Daniel Jacobowitz [this message]
2002-02-01 10:15 Don Bowman
2002-02-01 11:32 ` Daniel Jacobowitz
2002-02-02 11:16 ` Greg McGary
2002-02-02 9:57 David Anderson
2002-02-02 10:58 David Anderson
2002-02-02 11:26 Don Bowman
2002-02-02 12:11 ` Stan Shebs
2002-02-02 12:14 Don Bowman
2002-02-02 14:45 ` Daniel Jacobowitz
2002-02-03 12:29 Don Bowman
2002-02-03 12:29 ` Daniel Jacobowitz
2002-02-03 12:29 ` Andrew Cagney
2002-02-03 12:13 ` Daniel Jacobowitz
2002-02-03 12:29 ` Andrew Cagney
2002-02-03 15:49 Don Bowman
2002-02-04 9:22 David Anderson
2002-02-06 9:40 Don Bowman
2002-02-06 16:45 ` Daniel Jacobowitz
2002-02-07 6:56 Don Bowman
2002-02-07 7:30 ` 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=20020201123707.A28873@nevyn.them.org \
--to=drow@mvista.com \
--cc=don@sandvine.com \
--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