mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
arm/backtrace: add support for EHABI(Exception Handling ABI) stack unwinder
Reference: https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst https://github.com/ARM-software/abi-aa/releases/download/2022Q1/ehabi32.pdf Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -1218,6 +1218,42 @@ config ARM_SEMIHOSTING_HOSTFS_CACHE_COHERENCE
|
||||
|
||||
endif
|
||||
|
||||
if SCHED_BACKTRACE
|
||||
|
||||
choice
|
||||
prompt "Choose ARM unwinder"
|
||||
default UNWINDER_STACK_POINTER if ARM_THUMB
|
||||
default UNWINDER_FRAME_POINTER if !ARM_THUMB
|
||||
---help---
|
||||
This determines which method will be used for unwinding nuttx stack
|
||||
traces for debug.
|
||||
|
||||
config UNWINDER_FRAME_POINTER
|
||||
bool "Frame pointer unwinder"
|
||||
select FRAME_POINTER
|
||||
---help---
|
||||
This option enables the frame pointer unwinder for unwinding
|
||||
nuttx stack traces.
|
||||
|
||||
config UNWINDER_STACK_POINTER
|
||||
bool "Stack pointer unwinder"
|
||||
---help---
|
||||
This option enables the stack pointer unwinder for unwinding
|
||||
nuttx stack traces.
|
||||
|
||||
config UNWINDER_ARM
|
||||
bool "ARM EHABI stack unwinder"
|
||||
---help---
|
||||
This option enables stack unwinding support in the nuttx
|
||||
using the information automatically generated by the
|
||||
compiler. The resulting nuttx image is slightly bigger but
|
||||
the performance is not affected. Currently, this feature
|
||||
only works with EABI compilers.
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
if ARCH_ARMV6M
|
||||
source "arch/arm/src/armv6-m/Kconfig"
|
||||
endif
|
||||
|
||||
@@ -63,16 +63,16 @@ ifeq ($(CONFIG_SCHED_THREAD_LOCAL),y)
|
||||
CMN_CSRCS += arm_tls.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SCHED_BACKTRACE),y)
|
||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
||||
ifeq ($(CONFIG_ARM_THUMB),y)
|
||||
CMN_CSRCS += arm_backtrace_thumb.c
|
||||
else
|
||||
CMN_CSRCS += arm_backtrace_fp.c
|
||||
endif
|
||||
else
|
||||
CMN_CSRCS += arm_backtrace_thumb.c
|
||||
endif
|
||||
ifeq ($(CONFIG_UNWINDER_FRAME_POINTER),y)
|
||||
CMN_CSRCS += arm_backtrace_fp.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UNWINDER_STACK_POINTER),y)
|
||||
CMN_CSRCS += arm_backtrace_thumb.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UNWINDER_ARM),y)
|
||||
CMN_CSRCS += arm_backtrace_unwind.c
|
||||
endif
|
||||
|
||||
CMN_ASRCS += vfork.S
|
||||
|
||||
@@ -74,6 +74,10 @@ ifeq ($(CONFIG_ARM_THUMB),y)
|
||||
ARCHOPTIMIZATION += -mthumb
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UNWINDER_ARM),y)
|
||||
ARCHOPTIMIZATION += -funwind-tables -fasynchronous-unwind-tables
|
||||
endif
|
||||
|
||||
# Link Time Optimization
|
||||
|
||||
ifeq ($(CONFIG_LTO_THIN),y)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user