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

Changeset a7a0417 in mainline


Ignore:
Timestamp:
2010-01-01T20:55:45Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
21580dd, e405228
Parents:
40cb845e (diff), 50286ec (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 arm32 uspace stack tracing.

Location:
uspace/lib/libc/arch/arm32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/arm32/Makefile.inc

    r40cb845e ra7a0417  
    4040        arch/$(UARCH)/src/stacktrace.S
    4141
    42 GCC_CFLAGS += -ffixed-r9 -mtp=soft
     42GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer
    4343LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a
    4444
  • uspace/lib/libc/arch/arm32/include/fibril.h

    r40cb845e ra7a0417  
    5858 *  @param ptls  Pointer to the TCB.
    5959 */
    60 #define context_set(c, _pc, stack, size, ptls)                  \
    61         (c)->pc = (sysarg_t) (_pc);                             \
    62         (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
    63         (c)->tls = ((sysarg_t)(ptls)) + sizeof(tcb_t) + ARM_TP_OFFSET;
    64 
     60#define context_set(c, _pc, stack, size, ptls) \
     61        do { \
     62                (c)->pc = (sysarg_t) (_pc); \
     63                (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
     64                (c)->tls = ((sysarg_t)(ptls)) + sizeof(tcb_t) + ARM_TP_OFFSET; \
     65                (c)->fp = 0; \
     66        } while (0)
    6567
    6668/** Fibril context.
     
    7981        uint32_t r7;
    8082        uint32_t r8;
    81         uint32_t tls;
     83        uint32_t tls;   /* r9 */
    8284        uint32_t r10;
    83         uint32_t r11;
     85        uint32_t fp;    /* r11 */
    8486} context_t;
    8587
  • uspace/lib/libc/arch/arm32/src/entry.s

    r40cb845e ra7a0417  
    4343        str r2, [r0]
    4444
     45        #
     46        # Create the first stack frame.
     47        #
     48        mov fp, #0
     49        mov ip, sp
     50        push {fp, ip, lr, pc}
     51        sub fp, ip, #4
     52
    4553        # Pass pcb_ptr to __main as the first argument (in r0)
    4654        mov r0, r1
  • uspace/lib/libc/arch/arm32/src/stacktrace.S

    r40cb845e ra7a0417  
    3636
    3737frame_pointer_get:
    38 frame_pointer_prev:
    39 frame_pointer_validate:
    40 return_address_get:
    41 program_counter_get:
    42         mov r0, #0
     38        mov r0, fp
    4339        mov pc, lr
    4440
     41frame_pointer_prev:
     42        ldr r0, [r0, #-12]
     43        mov pc, lr
     44
     45frame_pointer_validate:
     46        mov pc, lr
     47
     48return_address_get:
     49        ldr r0, [r0, #-4]
     50        mov pc, lr
     51
     52program_counter_get:
     53        mov r0, lr
     54        mov pc, lr
     55
  • uspace/lib/libc/arch/arm32/src/thread_entry.s

    r40cb845e ra7a0417  
    3535#
    3636__thread_entry:
     37        #
     38        # Create the first stack frame.
     39        #
     40        mov fp, #0
     41        mov ip, sp
     42        push {fp, ip, lr, pc}
     43        sub fp, ip, #4
     44
    3745        b __thread_main
Note: See TracChangeset for help on using the changeset viewer.