summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/stackchk/check.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-28 14:53:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-28 14:53:46 +0000
commit0faa8b117e4ff7663df224bb031b1fdbd3610120 (patch)
treecd1af8159ea52c5d564cd37a800588aefce1dafa /cpukit/libmisc/stackchk/check.c
parentRemove (obsolete). (diff)
downloadrtems-0faa8b117e4ff7663df224bb031b1fdbd3610120.tar.bz2
2007-09-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/stackchk/check.c: Eliminate output with little information. Always print a blown message using the same routine. Now works with GNAT RTS -fstack-checking if you have patch for the RTEMS specific support in your GCC version.
Diffstat (limited to '')
-rw-r--r--cpukit/libmisc/stackchk/check.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index 11bbcecead..a127079fec 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -64,11 +64,9 @@ static inline boolean Stack_check_Frame_pointer_in_range(
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
- printk( "Stack Pointer Too Low!\n" );
return FALSE;
}
if ( sp > (the_stack->area + the_stack->size) ) {
- printk( "Stack Pointer Too High!\n" );
return FALSE;
}
#else
@@ -225,16 +223,14 @@ void Stack_check_report_blown_task(
#if defined(RTEMS_MULTIPROCESSING)
if (rtems_configuration_get_user_multiprocessing_table()) {
printk(
- "; node=%d\n",
+ "; node=%d",
rtems_configuration_get_user_multiprocessing_table()->node
);
}
- #else
- printk( "\n" );
#endif
printk(
- " stack covers range 0x%p - 0x%p (%d bytes)\n",
+ "\n stack covers range 0x%p - 0x%p (%d bytes)\n",
stack->area,
stack->area + stack->size - 1,
stack->size
@@ -305,10 +301,17 @@ boolean rtems_stack_checker_is_blown( void )
));
}
- if ( !sp_ok || !pattern_ok ) {
- return TRUE;
- }
- return FALSE;
+ /*
+ * The Stack Pointer and the Pattern Area are OK so return FALSE.
+ */
+ if ( sp_ok && pattern_ok )
+ return FALSE;
+
+ /*
+ * Let's report as much as we can.
+ */
+ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
+ return TRUE;
}
/*