Skip to content

Commit 022404b

Browse files
committed
The stack dump of the major should be moved up.
1 parent 51964b3 commit 022404b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/source/mbed_error.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,8 @@ static void print_error_report(const mbed_error_ctx *ctx, const char *error_msg,
598598
ctx->thread_id, ctx->thread_entry_address, ctx->thread_stack_size, ctx->thread_stack_mem, ctx->thread_current_sp);
599599
#endif
600600

601+
print_stack_dump(ctx->thread_stack_mem, ctx->thread_stack_size, ctx->thread_current_sp);
602+
601603
#if MBED_CONF_PLATFORM_ERROR_ALL_THREADS_INFO && defined(MBED_CONF_RTOS_PRESENT)
602604
mbed_error_printf("\nNext:");
603605
print_thread(osRtxInfo.thread.run.next);
@@ -619,8 +621,6 @@ static void print_error_report(const mbed_error_ctx *ctx, const char *error_msg,
619621
mbed_error_printf("\nFor more info, visit: https://mbed.com/s/error?error=0x%08X&osver=%" PRId32 "&core=0x%08" PRIX32 "&comp=%d&ver=%" PRIu32 "&tgt=" GET_TARGET_NAME(TARGET_NAME), ctx->error_status, sys_stats.os_version, sys_stats.cpu_id, sys_stats.compiler_id, sys_stats.compiler_version);
620622
#endif
621623

622-
print_stack_dump(ctx->thread_stack_mem, ctx->thread_stack_size, ctx->thread_current_sp);
623-
624624
mbed_error_printf("\n-- MbedOS Error Info --\n");
625625
}
626626
#endif //ifndef NDEBUG

0 commit comments

Comments
 (0)