Skip to contentSkip to conversation

allow CONFIG_FRAME_POINTER for x86-64

PATCH Chuck Ebbert 2 participants 2 messages Sep 9, 2005 – Sep 10, 2005

lore
Share & tools
lore
#0 lore raw

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

Quoted 6 lines · Hugh Dickins
Quoted 3 lines · Andi Kleen

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

#1 lore raw
Quoted 10 lines · Chuck Ebbert

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

Quoted 5 lines · Hugh Dickins
Quoted 2 lines · Andi Kleen

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)

Ok someone added it when I wasn't looking. It certainly wasn't there some time ago. However the point stands that x86-64 doesn't have such code.

-Andi