Changeset 7de7cde in mainline
- Timestamp:
- 2010-05-21T18:53:26Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31198c12
- Parents:
- 8aa9265
- Location:
- kernel/arch/ppc32/src/debug
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/debug/stacktrace.c
r8aa9265 r7de7cde 37 37 #include <typedefs.h> 38 38 39 #define FRAME_OFFSET_FP_PREV 0 40 #define FRAME_OFFSET_RA 1 41 39 42 bool kernel_frame_pointer_validate(uintptr_t fp) 40 43 { 41 return f alse;44 return fp != 0; 42 45 } 43 46 44 47 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 45 48 { 46 return false; 49 uint32_t *stack = (void *) fp; 50 *prev = stack[FRAME_OFFSET_FP_PREV]; 51 return true; 47 52 } 48 53 49 54 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra) 50 55 { 51 return false; 56 uint32_t *stack = (void *) fp; 57 *ra = stack[FRAME_OFFSET_RA]; 58 return true; 52 59 } 53 60 54 61 bool uspace_frame_pointer_validate(uintptr_t fp) 55 62 { 56 return f alse;63 return fp != 0; 57 64 } 58 65 -
kernel/arch/ppc32/src/debug/stacktrace_asm.S
r8aa9265 r7de7cde 27 27 # 28 28 29 #include <arch/asm/regname.h> 30 29 31 .text 30 32 … … 33 35 34 36 frame_pointer_get: 37 mr r3, sp 35 38 blr 36 39 37 40 program_counter_get: 41 mflr r3 38 42 blr
Note:
See TracChangeset
for help on using the changeset viewer.