Changeset afd0106 in mainline
- Timestamp:
- 2010-01-13T16:47:53Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1298da25
- Parents:
- 405f759
- Location:
- kernel/arch/arm32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/Makefile.inc
r405f759 rafd0106 38 38 ATSIGN = % 39 39 40 GCC_CFLAGS += -fno-zero-initialized-in-bss 40 GCC_CFLAGS += -fno-zero-initialized-in-bss -mapcs-frame 41 41 42 42 BITS = 32 -
kernel/arch/arm32/src/debug/stacktrace.c
r405f759 rafd0106 38 38 #include <typedefs.h> 39 39 40 #define FRAME_OFFSET_FP_PREV -3 41 #define FRAME_OFFSET_RA -1 42 40 43 bool kernel_frame_pointer_validate(uintptr_t fp) 41 44 { 42 return f alse;45 return fp != 0; 43 46 } 44 47 45 48 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 46 49 { 47 return false; 50 uint32_t *stack = (void *) fp; 51 52 *prev = stack[FRAME_OFFSET_FP_PREV]; 53 return true; 48 54 } 49 55 50 56 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra) 51 57 { 52 return false; 58 uint32_t *stack = (void *) fp; 59 60 *ra = stack[FRAME_OFFSET_RA]; 61 return true; 53 62 } 54 63 55 64 bool uspace_frame_pointer_validate(uintptr_t fp) 56 65 { 57 return f alse;66 return fp != 0; 58 67 } 59 68 60 69 bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 61 70 { 62 return false; 71 return !copy_from_uspace((void *) prev, 72 (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 63 73 } 64 74 65 75 bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra) 66 76 { 67 return false; 77 return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA, 78 sizeof(*ra)); 68 79 } 69 80 -
kernel/arch/arm32/src/debug/stacktrace_asm.S
r405f759 rafd0106 33 33 34 34 frame_pointer_get: 35 mov r0, fp 35 36 mov pc, lr 36 37 37 38 program_counter_get: 39 mov r0, lr 38 40 mov pc, lr
Note:
See TracChangeset
for help on using the changeset viewer.