Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ola Liljedahl <ola.liljedahl@gmail.com>
To: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/1] Pendantic stack backtrace code
Date: Wed, 19 Sep 2012 14:52:02 +0000 (UTC)	[thread overview]
Message-ID: <loom.20120919T164755-469@post.gmane.org> (raw)
In-Reply-To: 20110805020242.GA23916@dvomlehn-lnx2.corp.sa.net

I have also written a back-trace utility for MIPS, for Enea's "OSE" realtime OS.
Again, it was the sentences in "See MIPS Run" which inspired me (well the whole
book is full of inspiration, a great read). My twist to the solution is that my
design always scans instructions in the *forward* direction (from the specified
PC), trying to find the end of the function. In the process of doing so,
unconditional jumps are followed and conditional branches are followed both
ways. There is however no support for tracing over signal handlers since in the
OSE error handler, we will get the user space register dump for most exceptions
and can start back-tracing there.

The code is available here: https://dl.dropbox.com/u/45566557/mips_backtrace.c

Improvement suggestions and other comments are welcome.

-- Ola Liljedahl

      reply	other threads:[~2012-09-19 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 23:36 [PATCH 1/1] Pendantic stack backtrace code David VomLehn
2011-08-02 15:57 ` Ralf Baechle
2011-08-05  2:02   ` David VomLehn
2012-09-19 14:52     ` Ola Liljedahl [this message]

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=loom.20120919T164755-469@post.gmane.org \
    --to=ola.liljedahl@gmail.com \
    --cc=linux-mips@linux-mips.org \
    /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