Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 65914ac in mainline


Ignore:
Timestamp:
2010-07-16T09:20:46Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial
Children:
e314a12
Parents:
63bdde6
Message:

Fix amd64 build.

File:
1 edited

Legend:

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

    r63bdde6 r65914ac  
    4040#define FRAME_OFFSET_RA       1
    4141
    42 bool kernel_frame_pointer_validate(uintptr_t fp)
     42bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx)
    4343{
    44         return fp != 0;
     44        return ctx->fp != 0;
    4545}
    4646
    47 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
     47bool kernel_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev)
    4848{
    49         uint64_t *stack = (void *) fp;
     49        uint64_t *stack = (void *) ctx->fp;
    5050        *prev = stack[FRAME_OFFSET_FP_PREV];
    5151       
     
    5353}
    5454
    55 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
     55bool kernel_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra)
    5656{
    57         uint64_t *stack = (void *) fp;
     57        uint64_t *stack = (void *) ctx->fp;
    5858        *ra = stack[FRAME_OFFSET_RA];
    5959       
     
    6161}
    6262
    63 bool uspace_frame_pointer_validate(uintptr_t fp)
     63bool uspace_stack_trace_context_validate(stack_trace_context_t *ctx)
    6464{
    65         return fp != 0;
     65        return ctx->fp != 0;
    6666}
    6767
    68 bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
     68bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev)
    6969{
    7070        return !copy_from_uspace((void *) prev,
    71             (uint64_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
     71            (uint64_t *) ctx->fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
    7272}
    7373
    74 bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
     74bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra)
    7575{
    76         return !copy_from_uspace((void *) ra, (uint64_t *) fp + FRAME_OFFSET_RA,
    77             sizeof(*ra));
     76        return !copy_from_uspace((void *) ra,
     77            (uint64_t *) ctx->fp + FRAME_OFFSET_RA, sizeof(*ra));
    7878}
    7979
Note: See TracChangeset for help on using the changeset viewer.