Changeset 50286ec in mainline for uspace/lib/libc/arch/arm32/src


Ignore:
Timestamp:
2010-01-01T20:54:24Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5434000, a7a0417
Parents:
f0452536
Message:

Userspace support for stack traces on arm32.

Location:
uspace/lib/libc/arch/arm32/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/arm32/src/entry.s

    rf0452536 r50286ec  
    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

    rf0452536 r50286ec  
    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

    rf0452536 r50286ec  
    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.