lkml.org 
[lkml]   [2008]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] m68knommu: add pretty back strace
Greg Ungerer wrote:
> From: Sebastian Siewior <bigeasy@linutronix.de>
>
> With this patch and
> CONFIG_FRAME_POINTER=y
> CONFIG_KALLSYMS=y
> The backtrace shows resolved function names and their numeric
> address.

This is really not my area, but this patch reminds me of all the dwarf2
unwinder on x86 that caused so many problems in the beginning...

> [...]
> +#ifdef CONFIG_FRAME_POINTER
> + printk(KERN_EMERG "Call Trace:\n");
> +
> + last_stack = stack - 1;
> + while (stack <= endstack && stack > last_stack) {
> +
> + addr = *(stack + 1);
> + printk(KERN_EMERG " [%08lx] ", addr);
> + print_symbol(KERN_CONT "%s\n", addr);
> +
> + last_stack = stack;
> + stack = (unsigned long *)*stack;
> }
> printk("\n");
> +#else
> + printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n");

You could probably fall back to the old method in this case, no?

Also, if the stack is slightly corrupted on the top, the new method
might just bail out without giving any indication about the path that
lead there, when instead it could also fall back to the old method.

--
Paulo Marques - www.grupopie.com

"Feed the hungry, save the whales, free the mallocs!"


\
 
 \ /
  Last update: 2008-05-02 21:31    [W:0.050 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site