public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RFC. User space backtrace on segv
@ 2004-10-06 16:37 Alex Bennee
  2004-10-06 16:39 ` Alex Bennee
  2004-10-06 17:34 ` Neil Horman
  0 siblings, 2 replies; 6+ messages in thread
From: Alex Bennee @ 2004-10-06 16:37 UTC (permalink / raw)
  To: LinuxSH (sf), Linux-SH (m17n); +Cc: Linux Kernel Mailing List

Hi,

I hacked up this little patch to dump the stack and attempt to generate
a back-trace for errant user-space tasks.

What:

Generates a back-trace of the user application on (in this case) a segv
caused by an unaligned access. This particular patch is against 2.4.22
on the SH which is what I'm working with but there no reason it couldn't
be more generalised.

How:

Its not the most intelligent approach as it basically walks up the stack
reading values and seeing if the address corresponds to one of the
processes executable VMA's. If it matches it assumes its the return
address treats that section as a "frame"

Why:

I work with embedded systems and for a myriad of reasons doing a full
core dump of the crashing task is a pain. Often just knowing the
immediate call stack and local variables is enough to look at what went
wrong with objdump -S.

Questions:

Have I replicated anything that is already hidden in the code base?
Would this be useful (as a CONFIG_ option) for embedded systems?

-- 
Alex, Kernel Hacker: http://www.bennee.com/~alex/

"Mach was the greatest intellectual fraud in the last ten years."
"What about X?"
"I said `intellectual'."
	;login, 9/1990


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-07  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 16:37 [PATCH] RFC. User space backtrace on segv Alex Bennee
2004-10-06 16:39 ` Alex Bennee
2004-10-06 17:17   ` Arnd Bergmann
2004-10-06 17:34 ` Neil Horman
2004-10-07  9:48   ` P
2004-10-07 10:29   ` RTC (real time clock) question about sh4 7760 Fabio Giovagnini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox