From d2f13e4b12ca0926bdd8ea45cace831511005382 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 15 Feb 2016 13:47:05 -0600 Subject: [PATCH] SIM: If SMP is enabled, show CPU on assertion --- arch/sim/src/up_head.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/sim/src/up_head.c b/arch/sim/src/up_head.c index 68f34f6e99..f7f5374e3c 100644 --- a/arch/sim/src/up_head.c +++ b/arch/sim/src/up_head.c @@ -113,7 +113,13 @@ void up_assert(const uint8_t *filename, int line) { /* Show the location of the failed assertion */ - fprintf(stderr, "Assertion failed at file:%s line: %d\n", filename, line); +#ifdef CONFIG_SMP + fprintf(stderr, "CPU%d: Assertion failed at file:%s line: %d\n", + up_cpundx(), filename, line); +#else + fprintf(stderr, "Assertion failed at file:%s line: %d\n", + filename, line); +#endif /* Allow for any board/configuration specific crash information */