Ignore:
File:
1 edited

Legend:

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

    r7cf3e66 rd99c1d2  
    4040#define FRAME_OFFSET_RA         1
    4141
    42 bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx)
     42bool kernel_frame_pointer_validate(uintptr_t fp)
    4343{
    44         return ctx->fp != 0;
     44        return fp != 0;
    4545}
    4646
    47 bool kernel_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev)
     47bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    4848{
    49         uint32_t *stack = (void *) ctx->fp;
     49        uint32_t *stack = (void *) fp;
    5050        *prev = stack[FRAME_OFFSET_FP_PREV];
    5151        return true;
    5252}
    5353
    54 bool kernel_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra)
     54bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
    5555{
    56         uint32_t *stack = (void *) ctx->fp;
     56        uint32_t *stack = (void *) fp;
    5757        *ra = stack[FRAME_OFFSET_RA];
    5858        return true;
    5959}
    6060
    61 bool uspace_stack_trace_context_validate(stack_trace_context_t *ctx)
     61bool uspace_frame_pointer_validate(uintptr_t fp)
    6262{
    63         return ctx->fp != 0;
     63        return fp != 0;
    6464}
    6565
    66 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev)
     66bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    6767{
    6868        return !copy_from_uspace((void *) prev,
    69             (uint32_t *) ctx->fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
     69            (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
    7070}
    7171
    72 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra)
     72bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
    7373{
    74         return !copy_from_uspace((void *) ra,
    75             (uint32_t *) ctx->fp + FRAME_OFFSET_RA, sizeof(*ra));
     74        return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,
     75            sizeof(*ra));
    7676}
    7777
Note: See TracChangeset for help on using the changeset viewer.