[rtems commit] bsp/shared: Print the exception stack frame before the shut down message.

Chris Johns chrisj at rtems.org
Wed May 11 03:01:29 UTC 2016


Module:    rtems
Branch:    master
Commit:    b61f58fc2c322db40be570473a2dc345de3341ae
Changeset: http://git.rtems.org/rtems/commit/?id=b61f58fc2c322db40be570473a2dc345de3341ae

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri May  6 17:44:22 2016 +1000

bsp/shared: Print the exception stack frame before the shut down message.

This lets you see the exception otherwise the key press clears the screen
on the reboot on a PC BSP.

Also state there has been a fatal error.

---

 c/src/lib/libbsp/shared/bspclean.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c
index 2262c9d..4265f11 100644
--- a/c/src/lib/libbsp/shared/bspclean.c
+++ b/c/src/lib/libbsp/shared/bspclean.c
@@ -17,8 +17,14 @@ void bsp_fatal_extension(
   rtems_fatal_code code
 )
 {
+  #if (BSP_PRINT_EXCEPTION_CONTEXT)
+    if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
+      rtems_exception_frame_print( (const rtems_exception_frame *) code );
+    }
+  #endif
+
   #if (BSP_PRESS_KEY_FOR_RESET)
-    printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );
+    printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." );
 
     /*
      * Wait for a key to be pressed
@@ -29,12 +35,6 @@ void bsp_fatal_extension(
     printk("\n");
   #endif
 
-  #if (BSP_PRINT_EXCEPTION_CONTEXT)
-    if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
-      rtems_exception_frame_print( (const rtems_exception_frame *) code );
-    }
-  #endif
-
   /*
    *  Check both conditions -- if you want to ask for reboot, then
    *  you must have meant to reset the board.




More information about the vc mailing list