diff options
| author | Shell <[email protected]> | 2023-05-14 23:48:16 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-14 23:48:16 +0800 |
| commit | b7554a70d21582cab97028477941fb692ef248b8 (patch) | |
| tree | 31fde2a378142f21ceeb4593c0bb21422d5a4651 /components | |
| parent | f7337f9db6314723d6a46b1eb72c937cd1e66537 (diff) | |
[libcpu][component][debug] add debug info for gdb (#7033)
Diffstat (limited to 'components')
| -rw-r--r-- | components/lwp/arch/aarch64/cortex-a/lwp_gcc.S | 8 | ||||
| -rw-r--r-- | components/lwp/arch/arm/cortex-a/lwp_gcc.S | 4 | ||||
| -rw-r--r-- | components/lwp/arch/risc-v/rv64/lwp_gcc.S | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/components/lwp/arch/aarch64/cortex-a/lwp_gcc.S b/components/lwp/arch/aarch64/cortex-a/lwp_gcc.S index c873cd5357..43cac34edd 100644 --- a/components/lwp/arch/aarch64/cortex-a/lwp_gcc.S +++ b/components/lwp/arch/aarch64/cortex-a/lwp_gcc.S @@ -9,7 +9,7 @@ */ #include "rtconfig.h" - +#include "asm-generic.h" #include "asm-fpu.h" /********************* @@ -188,10 +188,9 @@ lwp_exec_user: /* * void SVC_Handler(regs); + * since this routine reset the SP, we take it as a start point */ -.global SVC_Handler -.type SVC_Handler, % function -SVC_Handler: +START_POINT(SVC_Handler) /* x0 is initial sp */ mov sp, x0 @@ -220,6 +219,7 @@ SVC_Handler: blr x30 /* jump explictly, make this code position independant */ b arch_syscall_exit +START_POINT_END(SVC_Handler) .global arch_syscall_exit arch_syscall_exit: diff --git a/components/lwp/arch/arm/cortex-a/lwp_gcc.S b/components/lwp/arch/arm/cortex-a/lwp_gcc.S index c25d5ee3ff..34f4d7e371 100644 --- a/components/lwp/arch/arm/cortex-a/lwp_gcc.S +++ b/components/lwp/arch/arm/cortex-a/lwp_gcc.S @@ -9,6 +9,7 @@ */ #include "rtconfig.h" +#include "asm-generic.h" #define Mode_USR 0x10 #define Mode_FIQ 0x11 @@ -153,7 +154,7 @@ lwp_exec_user: */ .global vector_swi .type vector_swi, % function -vector_swi: +START_POINT(vector_swi) push {lr} mrs lr, spsr push {r4, r5, lr} @@ -179,6 +180,7 @@ vector_swi: pop {r0 - r3, r12} beq arch_syscall_exit blx lr +START_POINT_END(vector_swi) .global arch_syscall_exit arch_syscall_exit: diff --git a/components/lwp/arch/risc-v/rv64/lwp_gcc.S b/components/lwp/arch/risc-v/rv64/lwp_gcc.S index 3977553dbf..de47b1e0ca 100644 --- a/components/lwp/arch/risc-v/rv64/lwp_gcc.S +++ b/components/lwp/arch/risc-v/rv64/lwp_gcc.S @@ -21,6 +21,7 @@ #include "cpuport.h" #include "encoding.h" #include "stackframe.h" +#include "asm-generic.h" .section .text.lwp @@ -269,8 +270,7 @@ arch_fork_exit: arch_clone_exit: j arch_syscall_exit -.global syscall_entry -syscall_entry: +START_POINT(syscall_entry) #ifndef ARCH_USING_NEW_CTX_SWITCH //swap to thread kernel stack csrr t0, sstatus @@ -319,6 +319,7 @@ copy_context_loop: OPEN_INTERRUPT call syscall_handler j arch_syscall_exit +START_POINT_END(syscall_entry) .global arch_syscall_exit arch_syscall_exit: |
