subsys/debug: remove CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
Having `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` to select the `CONFIG_SYMTAB` or to explicitly not print the symbol name during exception stack unwind seems unnecessary, as the extra code to print the symbol name is negligible when compared with the symbol table, so just remove it. Signed-off-by: Yong Cong Sin <ycsin@meta.com> Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
ab676fdb86
commit
074931057c
3 changed files with 5 additions and 14 deletions
|
@ -248,20 +248,20 @@ static bool in_fatal_stack_bound(uintptr_t addr, const struct k_thread *const th
|
||||||
#define PR_REG "%016" PRIxPTR
|
#define PR_REG "%016" PRIxPTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
|
#ifdef CONFIG_SYMTAB
|
||||||
#define LOG_STACK_TRACE(idx, ra, name, offset) \
|
#define LOG_STACK_TRACE(idx, ra, name, offset) \
|
||||||
LOG_ERR(" %2d: ra: " PR_REG " [%s+0x%x]", idx, ra, name, offset)
|
LOG_ERR(" %2d: ra: " PR_REG " [%s+0x%x]", idx, ra, name, offset)
|
||||||
#else
|
#else
|
||||||
#define LOG_STACK_TRACE(idx, ra, name, offset) LOG_ERR(" %2d: ra: " PR_REG, idx, ra)
|
#define LOG_STACK_TRACE(idx, ra, name, offset) LOG_ERR(" %2d: ra: " PR_REG, idx, ra)
|
||||||
#endif /* CONFIG_EXCEPTION_STACK_TRACE_SYMTAB */
|
#endif /* CONFIG_SYMTAB */
|
||||||
|
|
||||||
static bool print_trace_address(void *arg, unsigned long ra)
|
static bool print_trace_address(void *arg, unsigned long ra)
|
||||||
{
|
{
|
||||||
int *i = arg;
|
int *i = arg;
|
||||||
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
|
#ifdef CONFIG_SYMTAB
|
||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
const char *name = symtab_find_symbol_name(ra, &offset);
|
const char *name = symtab_find_symbol_name(ra, &offset);
|
||||||
#endif
|
#endif /* CONFIG_SYMTAB */
|
||||||
|
|
||||||
LOG_STACK_TRACE((*i)++, ra, name, offset);
|
LOG_STACK_TRACE((*i)++, ra, name, offset);
|
||||||
|
|
||||||
|
|
|
@ -387,15 +387,6 @@ config EXCEPTION_STACK_TRACE
|
||||||
print a stack trace of function memory addresses when an
|
print a stack trace of function memory addresses when an
|
||||||
exception is reported.
|
exception is reported.
|
||||||
|
|
||||||
config EXCEPTION_STACK_TRACE_SYMTAB
|
|
||||||
bool "Print function names in the stack trace"
|
|
||||||
select SYMTAB
|
|
||||||
depends on EXCEPTION_STACK_TRACE
|
|
||||||
help
|
|
||||||
Enable this if you want to print the function names in the
|
|
||||||
stack trace output. This will generate the symtab and
|
|
||||||
can consume a lot of ROM if there's a lot of functions.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Miscellaneous debugging options
|
# Miscellaneous debugging options
|
||||||
#
|
#
|
||||||
|
|
|
@ -68,7 +68,7 @@ tests:
|
||||||
- qemu_cortex_a53
|
- qemu_cortex_a53
|
||||||
extra_configs:
|
extra_configs:
|
||||||
- CONFIG_FRAME_POINTER=y
|
- CONFIG_FRAME_POINTER=y
|
||||||
- CONFIG_EXCEPTION_STACK_TRACE_SYMTAB=y
|
- CONFIG_SYMTAB=y
|
||||||
harness_config:
|
harness_config:
|
||||||
type: multi_line
|
type: multi_line
|
||||||
regex:
|
regex:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue