Changeset e819fefc in rtems


Ignore:
Timestamp:
Dec 3, 2002, 12:47:10 AM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
82b1805
Parents:
5a5b0b52
Message:

2002-12-02 Joel Sherrill <joel@…>

  • stackchk/check.c: Better handling of task name.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/libmisc/ChangeLog

    r5a5b0b52 re819fefc  
     12002-12-02      Joel Sherrill <joel@OARcorp.com>
     2
     3        * stackchk/check.c: Better handling of task name.
     4
    152002-11-15      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • c/src/libmisc/stackchk/check.c

    r5a5b0b52 re819fefc  
    421421  Stack_Control  *stack;
    422422  unsigned32      u32_name;
    423   char            name[5];
    424 
     423  char            name_str[5];
     424  char            *name;
     425  Objects_Information *info;
    425426
    426427  if ( !the_thread )
     
    454455    used = 0;
    455456
    456   if ( the_thread )
    457     u32_name = *(unsigned32 *)the_thread->Object.name;
    458   else
     457  info = _Objects_Get_information(the_thread->Object.id);
     458  name = name_str;
     459  if ( the_thread ) {
     460    if ( info->is_string ) {
     461      name = (char *) the_thread->Object.name;
     462    } else {
     463      u32_name = (unsigned32 *)the_thread->Object.name;
     464      name[ 0 ] = (u32_name >> 24) & 0xff;
     465      name[ 1 ] = (u32_name >> 16) & 0xff;
     466      name[ 2 ] = (u32_name >>  8) & 0xff;
     467      name[ 3 ] = (u32_name >>  0) & 0xff;
     468      name[ 4 ] = '\0';
     469    }
     470  } else {
    459471    u32_name = rtems_build_name('I', 'N', 'T', 'R');
    460 
    461   name[ 0 ] = (u32_name >> 24) & 0xff;
    462   name[ 1 ] = (u32_name >> 16) & 0xff;
    463   name[ 2 ] = (u32_name >>  8) & 0xff;
    464   name[ 3 ] = (u32_name >>  0) & 0xff;
    465   name[ 4 ] = '\0';
     472    name[ 0 ] = (u32_name >> 24) & 0xff;
     473    name[ 1 ] = (u32_name >> 16) & 0xff;
     474    name[ 2 ] = (u32_name >>  8) & 0xff;
     475    name[ 3 ] = (u32_name >>  0) & 0xff;
     476    name[ 4 ] = '\0';
     477  }
    466478
    467479  printf( "0x%08x  %4s  0x%08x  0x%08x   %8d   %8d\n",
  • cpukit/libmisc/ChangeLog

    r5a5b0b52 re819fefc  
     12002-12-02      Joel Sherrill <joel@OARcorp.com>
     2
     3        * stackchk/check.c: Better handling of task name.
     4
    152002-11-15      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • cpukit/libmisc/stackchk/check.c

    r5a5b0b52 re819fefc  
    421421  Stack_Control  *stack;
    422422  unsigned32      u32_name;
    423   char            name[5];
    424 
     423  char            name_str[5];
     424  char            *name;
     425  Objects_Information *info;
    425426
    426427  if ( !the_thread )
     
    454455    used = 0;
    455456
    456   if ( the_thread )
    457     u32_name = *(unsigned32 *)the_thread->Object.name;
    458   else
     457  info = _Objects_Get_information(the_thread->Object.id);
     458  name = name_str;
     459  if ( the_thread ) {
     460    if ( info->is_string ) {
     461      name = (char *) the_thread->Object.name;
     462    } else {
     463      u32_name = (unsigned32 *)the_thread->Object.name;
     464      name[ 0 ] = (u32_name >> 24) & 0xff;
     465      name[ 1 ] = (u32_name >> 16) & 0xff;
     466      name[ 2 ] = (u32_name >>  8) & 0xff;
     467      name[ 3 ] = (u32_name >>  0) & 0xff;
     468      name[ 4 ] = '\0';
     469    }
     470  } else {
    459471    u32_name = rtems_build_name('I', 'N', 'T', 'R');
    460 
    461   name[ 0 ] = (u32_name >> 24) & 0xff;
    462   name[ 1 ] = (u32_name >> 16) & 0xff;
    463   name[ 2 ] = (u32_name >>  8) & 0xff;
    464   name[ 3 ] = (u32_name >>  0) & 0xff;
    465   name[ 4 ] = '\0';
     472    name[ 0 ] = (u32_name >> 24) & 0xff;
     473    name[ 1 ] = (u32_name >> 16) & 0xff;
     474    name[ 2 ] = (u32_name >>  8) & 0xff;
     475    name[ 3 ] = (u32_name >>  0) & 0xff;
     476    name[ 4 ] = '\0';
     477  }
    466478
    467479  printf( "0x%08x  %4s  0x%08x  0x%08x   %8d   %8d\n",
Note: See TracChangeset for help on using the changeset viewer.