Changes in kernel/arch/ia32/src/debug/stacktrace.c [d99c1d2:7cf3e66] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/debug/stacktrace.c
rd99c1d2 r7cf3e66 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 *prev = stack[FRAME_OFFSET_FP_PREV]; 51 51 return true; 52 52 } 53 53 54 bool kernel_return_address_get( uintptr_t fp, uintptr_t *ra)54 bool kernel_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 55 55 { 56 uint32_t *stack = (void *) fp;56 uint32_t *stack = (void *) ctx->fp; 57 57 *ra = stack[FRAME_OFFSET_RA]; 58 58 return true; 59 59 } 60 60 61 bool uspace_ frame_pointer_validate(uintptr_t fp)61 bool uspace_stack_trace_context_validate(stack_trace_context_t *ctx) 62 62 { 63 return fp != 0;63 return ctx->fp != 0; 64 64 } 65 65 66 bool uspace_frame_pointer_prev( uintptr_t fp, uintptr_t *prev)66 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 67 67 { 68 68 return !copy_from_uspace((void *) prev, 69 (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));69 (uint32_t *) ctx->fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 70 70 } 71 71 72 bool uspace_return_address_get( uintptr_t fp, uintptr_t *ra)72 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 73 73 { 74 return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,75 sizeof(*ra));74 return !copy_from_uspace((void *) ra, 75 (uint32_t *) ctx->fp + FRAME_OFFSET_RA, sizeof(*ra)); 76 76 } 77 77
Note:
See TracChangeset
for help on using the changeset viewer.