summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-03-07 06:37:55 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-03-07 13:03:36 +0100
commitd39cc068738b5028af771e6ea280ce370a69d3ca (patch)
treebeb45d35f9d7d939c576f21d2fa1cc477b81bf73
parentcapture: Fix get priority methods (diff)
downloadrtems-d39cc068738b5028af771e6ea280ce370a69d3ca.tar.bz2
bsps: More verbose bsp_fatal_extension()
Close #3318.
-rw-r--r--c/src/lib/libbsp/shared/bspclean.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c
index e5fee78961..4ed6243b57 100644
--- a/c/src/lib/libbsp/shared/bspclean.c
+++ b/c/src/lib/libbsp/shared/bspclean.c
@@ -11,6 +11,8 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <rtems/version.h>
+#include <rtems/score/threadimpl.h>
+#include <inttypes.h>
void bsp_fatal_extension(
rtems_fatal_source source,
@@ -19,6 +21,8 @@ void bsp_fatal_extension(
)
{
#if BSP_VERBOSE_FATAL_EXTENSION
+ Thread_Control *executing;
+
printk(
"\n"
"*** FATAL ***\n"
@@ -55,6 +59,22 @@ void bsp_fatal_extension(
rtems_version(),
__VERSION__
);
+
+ executing = _Thread_Get_executing();
+
+ if ( executing != NULL ) {
+ char name[ 32 ];
+
+ _Thread_Get_name( executing, name, sizeof( name ) );
+ printk(
+ "executing thread ID: 0x08%" PRIx32 "\n"
+ "executing thread name: %s\n",
+ executing->Object.id,
+ name
+ );
+ } else {
+ printk( "executing thread is NULL\n" );
+ }
#endif
#if (BSP_PRESS_KEY_FOR_RESET)