Re: [discuss] [PATCH] allow CONFIG_FRAME_POINTER for x86-64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In-Reply-To: <[email protected]>

On Fri, 9 Sep 2005 at 12:14:38 +0100 (BST), Hugh Dickins wrote:

> On Fri, 9 Sep 2005, Andi Kleen wrote:
> > 
> > It won't give more accurate backtraces, not even on i386 because show_stack
> > doesn't have any code to follow frame pointers.
> 
> Ah, right.

What's this for, then? (arch/i386/kernel/traps.c line 116)


static inline unsigned long print_context_stack(struct thread_info *tinfo,
                                unsigned long *stack, unsigned long ebp)
{
        unsigned long addr;

#ifdef  CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
                printk(" [<%08lx>] ", addr);
                print_symbol("%s", addr);
                printk("\n");
                ebp = *(unsigned long *)ebp;
        }
#else


I get nice clean stack traces on i386 with frame pointers enabled and
the kernel is smaller as well.

__
Chuck
Subliminal URL: www.sluggy.com/daily.php?date=050905
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux