lkml.org 
[lkml]   [2006]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 06/11] print correct stack trace
    Pass unmodified stack argument to show_trace().

    Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

    ---

    arch/m68k/kernel/traps.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    Index: linux-2.6-mm/arch/m68k/kernel/traps.c
    ===================================================================
    --- linux-2.6-mm.orig/arch/m68k/kernel/traps.c
    +++ linux-2.6-mm/arch/m68k/kernel/traps.c
    @@ -992,6 +992,7 @@ void show_registers(struct pt_regs *regs

    void show_stack(struct task_struct *task, unsigned long *stack)
    {
    + unsigned long *p;
    unsigned long *endstack;
    int i;

    @@ -1004,12 +1005,13 @@ void show_stack(struct task_struct *task
    endstack = (unsigned long *)(((unsigned long)stack + THREAD_SIZE - 1) & -THREAD_SIZE);

    printk("Stack from %08lx:", (unsigned long)stack);
    + p = stack;
    for (i = 0; i < kstack_depth_to_print; i++) {
    - if (stack + 1 > endstack)
    + if (p + 1 > endstack)
    break;
    if (i % 8 == 0)
    printk("\n ");
    - printk(" %08lx", *stack++);
    + printk(" %08lx", *p++);
    }
    printk("\n");
    show_trace(stack);
    --

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-25 03:29    [W:0.047 / U:61.128 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site