From 11d617593f7c3b245b8d210e5b56ccbe64819fb7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 28 Sep 2007 15:03:48 +0000 Subject: 2007-09-28 Joel Sherrill * 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. --- cpukit/ChangeLog | 7 +++++++ cpukit/libmisc/stackchk/check.c | 23 +++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 1485afdeca..37a4b5ae00 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2007-09-28 Joel Sherrill + + * 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. + 2007-09-17 Joel Sherrill * posix/src/semaphorecreatesupp.c: Fixed warning. 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; } /* -- cgit v1.2.3