Changeset 0c39b96 in mainline


Ignore:
Timestamp:
2010-09-03T21:46:30Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
343f2b7e
Parents:
20235a3
Message:

If possible, print stack also with the mips32 trap frame and frames preceding
the trap. Currently, the stack tracer handles well only the most friendly cases,
but it stops tracing when the trap frame was inserted from a leaf-optimised
function. This is partly due to the fact that we are using a simplified
disassembling stack tracer and also because the stack trace printed from
panic_common() completely ignores the information available in istate (which
could be of some help).

Location:
kernel/arch/mips32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/debug/stacktrace.c

    r20235a3 r0c39b96  
    180180                                        return false;
    181181                                /* too big offsets are suspicious */
    182                                 if (offset > 32 * 4)
     182                                if ((size_t) offset > sizeof(istate_t))
    183183                                        return false;
    184184
  • kernel/arch/mips32/src/start.S

    r20235a3 r0c39b96  
    9191
    9292/*
     93 * The fake ABI prologue is never executed and may not be part of the
     94 * procedure's body. Instead, it should be immediately preceding the procedure's
     95 * body. Its only purpose is to trick the stack trace walker into thinking that
     96 * the exception is more or less just a normal function call.
     97 */
     98.macro FAKE_ABI_PROLOGUE
     99        sub $sp, ISTATE_SOFT_SIZE
     100        sw $ra, ISTATE_OFFSET_EPC($sp)
     101.endm
     102
     103/*
    93104 * Save registers to space defined by \r
    94105 * We will change status: Disable ERL, EXL, UM, IE
     
    251262        nop
    252263
     264        FAKE_ABI_PROLOGUE
    253265exception_handler:
    254266        KERNEL_STACK_TO_K0
     
    293305 */
    294306syscall_shortcut:
    295         /* we have a lot of space on the stack, with free use */
    296307        mfc0 $t3, $epc
    297308        mfc0 $t2, $status
     
    339350        eret
    340351
     352        FAKE_ABI_PROLOGUE
    341353tlb_refill_handler:
    342354        KERNEL_STACK_TO_K0
     
    352364        eret
    353365
     366        FAKE_ABI_PROLOGUE
    354367cache_error_handler:
    355368        KERNEL_STACK_TO_K0
Note: See TracChangeset for help on using the changeset viewer.