Changeset e314a12 in mainline
- Timestamp:
- 2010-07-16T09:31:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7cf3e66
- Parents:
- 65914ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/debug/stacktrace.c
r65914ac re314a12 40 40 #define FRAME_OFFSET_RA -1 41 41 42 bool kernel_ frame_pointer_validate(uintptr_t fp)42 bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx) 43 43 { 44 return fp != 0;44 return ctx->fp != 0; 45 45 } 46 46 47 bool kernel_frame_pointer_prev( uintptr_t fp, uintptr_t *prev)47 bool kernel_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 48 48 { 49 uint32_t *stack = (void *) fp;49 uint32_t *stack = (void *) ctx->fp; 50 50 51 51 *prev = stack[FRAME_OFFSET_FP_PREV]; … … 53 53 } 54 54 55 bool kernel_return_address_get( uintptr_t fp, uintptr_t *ra)55 bool kernel_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 56 56 { 57 uint32_t *stack = (void *) fp;57 uint32_t *stack = (void *) ctx->fp; 58 58 59 59 *ra = stack[FRAME_OFFSET_RA]; … … 61 61 } 62 62 63 bool uspace_ frame_pointer_validate(uintptr_t fp)63 bool uspace_stack_trace_context_validate(stack_trace_context_t *ctx) 64 64 { 65 return fp != 0;65 return ctx->fp != 0; 66 66 } 67 67 68 bool uspace_frame_pointer_prev( uintptr_t fp, uintptr_t *prev)68 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 69 69 { 70 70 return !copy_from_uspace((void *) prev, 71 (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));71 (uint32_t *) ctx->fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 72 72 } 73 73 74 bool uspace_return_address_get( uintptr_t fp, uintptr_t *ra)74 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 75 75 { 76 return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,77 sizeof(*ra));76 return !copy_from_uspace((void *) ra, 77 (uint32_t *) ctx->fp + FRAME_OFFSET_RA, sizeof(*ra)); 78 78 } 79 79
Note:
See TracChangeset
for help on using the changeset viewer.