linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <mcguire@lzu.edu.cn>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: linuxppc-dev@ozlabs.org, nvbolhuis@aimvalley.nl
Subject: Re: can the kernel show user task stack backtrace ?
Date: Thu, 30 Jul 2009 18:55:55 +0200	[thread overview]
Message-ID: <20090730165555.GA5476@opentech.at> (raw)
In-Reply-To: <20090730161941.GA14988@mail.gnudd.com>

On Thu, 30 Jul 2009, Alessandro Rubini wrote:

> > We're dealing with some complex (3rd party) applications and I like to see a
> > user task stack backtrace.
> > 
> > (Of course the way to go here is to use a debugger (gdb) and
> >   do a backtrace (with the coredump file).
> 
> Actually, you can intercept SIGSEGV and print your own stack from within
> the signal handler. You can also open /proc/self/maps and print it, to
> ease understanding the various pointers in there, especially if the
> application is using a number of shared libs.
> 
> This is usually easier than getting to a core dump, although there is
> less information than what the core offers.
> 
> I have the code for ARM and I've it on ppc once, but I must dig for the actual
> code.
>
I think libSegFault.so (part of glibc) can do that by simply preloading it 

LD_PRELOAD=/lib/libSegFault.so ./your_segfaulting_app

should do the trick.

hofrat

  reply	other threads:[~2009-07-30 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 15:46 can the kernel show user task stack backtrace ? Norbert van Bolhuis
2009-07-30 16:19 ` Alessandro Rubini
2009-07-30 16:55   ` Nicholas Mc Guire [this message]
2009-07-31  8:01     ` Norbert van Bolhuis

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=20090730165555.GA5476@opentech.at \
    --to=mcguire@lzu.edu.cn \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nvbolhuis@aimvalley.nl \
    --cc=rubini@gnudd.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 NNTP newsgroup(s).