Skip to content

Commit

Permalink
debug: remove !OMIT_FRAME_POINTER from EXCEPTION_STACK_TRACE
Browse files Browse the repository at this point in the history
Not all stack trace implementation requires frame pointer, move
that dependency to architecture Kconfig.

Signed-off-by: Yong Cong Sin <[email protected]>
  • Loading branch information
ycsin committed May 28, 2024
1 parent 1708140 commit 98a524a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/x86/core/Kconfig.ia32
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions arch/x86/core/Kconfig.intel64
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion subsys/debug/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,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
Expand Down
1 change: 1 addition & 0 deletions tests/arch/common/stack_unwind/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ tests:
extra_configs:
- CONFIG_NO_OPTIMIZATIONS=y
- CONFIG_DEBUG_INFO=y
- CONFIG_OMIT_FRAME_POINTER=n
integration_platforms:
- qemu_x86
- qemu_x86_64
Expand Down

0 comments on commit 98a524a

Please sign in to comment.