mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
This commit introduces a new Kconfig option LIBC_MUTEX_BACKTRACE_SKIP tocontrol the number of initial addresses skipped when generating mutex backtraces. Key changes: 1. Add LIBC_MUTEX_BACKTRACE_SKIP Kconfig entry (depends on LIBC_MUTEX_BACKTRACE > 0), defaulting to 2. This option lets users configure how many leading addresses are omitted from the mutex backtrace output. 2. Modify the nxmutex_add_backtrace() function to pass the new config value as the skip parameter to sched_backtrace(), replacing the hardcoded 0. This enhancement improves the usability of mutex backtraces by allowing removalof uninformative initial stack frames (e.g., backtrace helper functions ormutex acquisition wrappers), making the relevant call stack entries more visiblefor debugging lock-related issues. The default value (2) maintains sensibleout-of-the-box behavior while enabling customization for specific use cases. Signed-off-by: chao an <anchao.archer@bytedance.com>