Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2010-01-13T17:52:13Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
65737d4, 990c70e
Parents:
439ba77 (diff), 15817089 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge the stacktrace branch.

This merge introduces support for kernel stack traces on arm32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/debug/stacktrace.c

    r439ba77 rfd608dc  
    3838#include <typedefs.h>
    3939
     40#define FRAME_OFFSET_FP_PREV    -3
     41#define FRAME_OFFSET_RA         -1
     42
    4043bool kernel_frame_pointer_validate(uintptr_t fp)
    4144{
    42         return false;
     45        return fp != 0;
    4346}
    4447
    4548bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    4649{
    47         return false;
     50        uint32_t *stack = (void *) fp;
     51
     52        *prev = stack[FRAME_OFFSET_FP_PREV];
     53        return true;
    4854}
    4955
    5056bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
    5157{
    52         return false;
     58        uint32_t *stack = (void *) fp;
     59
     60        *ra = stack[FRAME_OFFSET_RA];
     61        return true;
    5362}
    5463
    5564bool uspace_frame_pointer_validate(uintptr_t fp)
    5665{
    57         return false;
     66        return fp != 0;
    5867}
    5968
    6069bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    6170{
    62         return false;
     71        return !copy_from_uspace((void *) prev,
     72            (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
    6373}
    6474
    6575bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
    6676{
    67         return false;
     77        return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,
     78            sizeof(*ra));
    6879}
    6980
Note: See TracChangeset for help on using the changeset viewer.