Changeset 8a775c27 in rtems for cpukit/libmisc/stackchk/check.c


Ignore:
Timestamp:
Mar 27, 2009, 1:45:31 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
2649eef
Parents:
8916bdc7
Message:

2009-03-27 Sebastian Huber <sebastian.huber@…>

  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/stackchk/check.c

    r8916bdc7 r8a775c27  
    206206 *        the following message out.
    207207 */
    208 void Stack_check_report_blown_task(
    209   Thread_Control *running,
    210   bool         pattern_ok
    211 )
     208void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
    212209{
    213210  Stack_Control *stack = &running->Start.Initial_stack;
    214 
     211  char *pattern_area = Stack_check_Get_pattern_area(stack);
     212  char name [32];
     213
     214  printk("BLOWN STACK!!!\n");
     215  printk("task control block: 0x%08lx\n", (unsigned long) running);
     216  printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
    215217  printk(
    216     "BLOWN STACK!!! Offending task(0x%p): "
    217         "id=0x%08" PRIx32 "; name=0x%08" PRIx32,
    218     running,
    219     running->Object.id,
    220     running->Object.name.name_u32
     218    "task name: 0x%08lx\n",
     219    (unsigned long) running->Object.name.name_u32
    221220  );
     221  printk(
     222    "task name string: %s\n",
     223    rtems_object_get_name(running->Object.id, sizeof(name), name)
     224  );
     225  printk(
     226    "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n",
     227    (unsigned long) stack->size,
     228    (unsigned long) stack->area,
     229    (unsigned long) ((char *) stack->area + stack->size)
     230  );
     231  if (!pattern_ok) {
     232    printk(
     233      "damaged pattern area (%lu Bytes): 0x%08lx .. 0x%08lx\n",
     234      (unsigned long) PATTERN_SIZE_BYTES,
     235      (unsigned long) pattern_area,
     236      (unsigned long) (pattern_area + PATTERN_SIZE_BYTES)
     237    );
     238  }
    222239
    223240  #if defined(RTEMS_MULTIPROCESSING)
    224241    if (rtems_configuration_get_user_multiprocessing_table()) {
    225242      printk(
    226         "; node=%d",
    227         rtems_configuration_get_user_multiprocessing_table()->node
     243        "node: 0x%08lx\n",
     244        (unsigned long)
     245          rtems_configuration_get_user_multiprocessing_table()->node
    228246      );
    229247    }
    230248  #endif
    231249
    232   printk(
    233     "\n  stack covers range 0x%p - 0x%p (%d bytes)\n",
    234     stack->area,
    235     stack->area + stack->size - 1,
    236     stack->size
    237   );
    238 
    239   if ( !pattern_ok ) {
    240     printk(
    241       "  Damaged pattern begins at 0x%08lx and is %d bytes long\n",
    242       (unsigned long) Stack_check_Get_pattern_area(stack),
    243       PATTERN_SIZE_BYTES);
    244   }
    245 
    246   rtems_fatal_error_occurred( 0x81 );
     250  rtems_fatal_error_occurred(0x81);
    247251}
    248252
Note: See TracChangeset for help on using the changeset viewer.