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