diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-27 13:45:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-27 13:45:31 +0000 |
commit | 8a775c27fc62ddb08f7705e20de34b55434dfdb1 (patch) | |
tree | 53c42ea9c99c5ff07a75166e3d23fc801a3fb7b0 /cpukit/libmisc/stackchk/check.c | |
parent | * libmisc/shell/shell.h: Pointer to (diff) | |
download | rtems-8a775c27fc62ddb08f7705e20de34b55434dfdb1.tar.bz2 |
2009-03-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* Makefile.am, preinstall.am, libmisc/Makefile.am,
libmisc/shell/shell.c, libmisc/shell/shell.h, telnetd/check_passwd.c,
telnetd/telnetd.c, telnetd/telnetd.h:
Generalized login check.
* libmisc/shell/login.h, libmisc/shell/login_check.c,
libmisc/shell/login_prompt.c: New files.
* libmisc/stackchk/check.c: Changed format for blown stack message.
* libcsupport/src/libio_sockets.c: Removed superfluous cast.
* libnetworking/rtems/ftpfs.h: Documentation.
Diffstat (limited to 'cpukit/libmisc/stackchk/check.c')
-rw-r--r-- | cpukit/libmisc/stackchk/check.c | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c index f63adc94cc..4cca9800fc 100644 --- a/cpukit/libmisc/stackchk/check.c +++ b/cpukit/libmisc/stackchk/check.c @@ -205,45 +205,49 @@ void rtems_stack_checker_begin_extension( * NOTE: The system is in a questionable state... we may not get * the following message out. */ -void Stack_check_report_blown_task( - Thread_Control *running, - bool pattern_ok -) +void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; + char *pattern_area = Stack_check_Get_pattern_area(stack); + char name [32]; + printk("BLOWN STACK!!!\n"); + printk("task control block: 0x%08lx\n", (unsigned long) running); + printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); + printk( + "task name: 0x%08lx\n", + (unsigned long) running->Object.name.name_u32 + ); + printk( + "task name string: %s\n", + rtems_object_get_name(running->Object.id, sizeof(name), name) + ); printk( - "BLOWN STACK!!! Offending task(0x%p): " - "id=0x%08" PRIx32 "; name=0x%08" PRIx32, - running, - running->Object.id, - running->Object.name.name_u32 + "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", + (unsigned long) stack->size, + (unsigned long) stack->area, + (unsigned long) ((char *) stack->area + stack->size) ); + if (!pattern_ok) { + printk( + "damaged pattern area (%lu Bytes): 0x%08lx .. 0x%08lx\n", + (unsigned long) PATTERN_SIZE_BYTES, + (unsigned long) pattern_area, + (unsigned long) (pattern_area + PATTERN_SIZE_BYTES) + ); + } #if defined(RTEMS_MULTIPROCESSING) if (rtems_configuration_get_user_multiprocessing_table()) { printk( - "; node=%d", - rtems_configuration_get_user_multiprocessing_table()->node + "node: 0x%08lx\n", + (unsigned long) + rtems_configuration_get_user_multiprocessing_table()->node ); } #endif - printk( - "\n stack covers range 0x%p - 0x%p (%d bytes)\n", - stack->area, - stack->area + stack->size - 1, - stack->size - ); - - if ( !pattern_ok ) { - printk( - " Damaged pattern begins at 0x%08lx and is %d bytes long\n", - (unsigned long) Stack_check_Get_pattern_area(stack), - PATTERN_SIZE_BYTES); - } - - rtems_fatal_error_occurred( 0x81 ); + rtems_fatal_error_occurred(0x81); } /* |