From 8a5823b474dbaba2afee2951132963c20fe89d3d Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Sat, 25 May 2024 12:43:15 +0800 Subject: [PATCH] debug: remove `!OMIT_FRAME_POINTER` from EXCEPTION_STACK_TRACE Not all stack trace implementation requires frame pointer, move that dependency to architecture Kconfig. Signed-off-by: Yong Cong Sin --- arch/x86/core/Kconfig.ia32 | 1 + arch/x86/core/Kconfig.intel64 | 1 + subsys/debug/Kconfig | 1 - tests/arch/common/stack_unwind/testcase.yaml | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/core/Kconfig.ia32 b/arch/x86/core/Kconfig.ia32 index cd2d0d23a92..25cf5c93cb9 100644 --- a/arch/x86/core/Kconfig.ia32 +++ b/arch/x86/core/Kconfig.ia32 @@ -168,6 +168,7 @@ config X86_EXCEPTION_STACK_TRACE default y depends on EXCEPTION_STACK_TRACE depends on DEBUG_INFO + depends on !OMIT_FRAME_POINTER help Internal config to enable runtime stack traces on fatal exceptions. diff --git a/arch/x86/core/Kconfig.intel64 b/arch/x86/core/Kconfig.intel64 index 00c4882a079..f519aa24435 100644 --- a/arch/x86/core/Kconfig.intel64 +++ b/arch/x86/core/Kconfig.intel64 @@ -34,6 +34,7 @@ config X86_EXCEPTION_STACK_TRACE default y depends on EXCEPTION_STACK_TRACE depends on DEBUG_INFO + depends on !OMIT_FRAME_POINTER depends on NO_OPTIMIZATIONS help Internal config to enable runtime stack traces on fatal exceptions. diff --git a/subsys/debug/Kconfig b/subsys/debug/Kconfig index 06dbe50a428..4ba285b613c 100644 --- a/subsys/debug/Kconfig +++ b/subsys/debug/Kconfig @@ -382,7 +382,6 @@ config SYMTAB config EXCEPTION_STACK_TRACE bool "Attempt to print stack traces upon exceptions" default y - depends on !OMIT_FRAME_POINTER help If the architecture fatal handling code supports it, attempt to print a stack trace of function memory addresses when an diff --git a/tests/arch/common/stack_unwind/testcase.yaml b/tests/arch/common/stack_unwind/testcase.yaml index ae53406202c..eee2ffe3112 100644 --- a/tests/arch/common/stack_unwind/testcase.yaml +++ b/tests/arch/common/stack_unwind/testcase.yaml @@ -33,6 +33,7 @@ tests: extra_configs: - CONFIG_NO_OPTIMIZATIONS=y - CONFIG_DEBUG_INFO=y + - CONFIG_OMIT_FRAME_POINTER=n integration_platforms: - qemu_x86 - qemu_x86_64