1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20709 from benpicco/stack_overflow-thread

cpu/cortexm_common: print last active thread on stack corruption
This commit is contained in:
Marian Buschsieweke 2024-05-30 07:17:21 +00:00 committed by GitHub
commit ea3d4c8a65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -353,6 +353,7 @@ __attribute__((used)) void hard_fault_handler(uint32_t* sp, uint32_t corrupted,
/* Sanity check stack pointer and give additional feedback about hard fault */
if (corrupted) {
puts("Stack pointer corrupted, reset to top of stack");
printf("active thread: %"PRIkernel_pid"\n", thread_getpid());
}
else {
uint32_t r0 = sp[0];