Changes in kernel/arch/ppc32/src/debug/stacktrace.c [b92ee1e:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/debug/stacktrace.c
rb92ee1e rd99c1d2 37 37 #include <typedefs.h> 38 38 39 #define FRAME_OFFSET_FP_PREV 0 40 #define FRAME_OFFSET_RA 1 41 42 bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx) 39 bool kernel_frame_pointer_validate(uintptr_t fp) 43 40 { 44 return ctx->fp != 0;41 return false; 45 42 } 46 43 47 bool kernel_frame_pointer_prev( stack_trace_context_t *ctx, uintptr_t *prev)44 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 48 45 { 49 uint32_t *stack = (void *) ctx->fp; 50 *prev = stack[FRAME_OFFSET_FP_PREV]; 51 return true; 46 return false; 52 47 } 53 48 54 bool kernel_return_address_get( stack_trace_context_t *ctx, uintptr_t *ra)49 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra) 55 50 { 56 uint32_t *stack = (void *) ctx->fp; 57 *ra = stack[FRAME_OFFSET_RA]; 58 return true; 51 return false; 59 52 } 60 53 61 bool uspace_ stack_trace_context_validate(stack_trace_context_t *ctx)54 bool uspace_frame_pointer_validate(uintptr_t fp) 62 55 { 63 return ctx->fp != 0;56 return false; 64 57 } 65 58 66 bool uspace_frame_pointer_prev( stack_trace_context_t *ctx, uintptr_t *prev)59 bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 67 60 { 68 return !copy_from_uspace((void *) prev, 69 (uint32_t *) ctx->fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 61 return false; 70 62 } 71 63 72 bool uspace_return_address_get( stack_trace_context_t *ctx, uintptr_t *ra)64 bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra) 73 65 { 74 return !copy_from_uspace((void *) ra, 75 (uint32_t *) ctx->fp + FRAME_OFFSET_RA, sizeof(*ra)); 66 return false; 76 67 } 77 68
Note:
See TracChangeset
for help on using the changeset viewer.