Changeset 0dba6bf in rtems-testing


Ignore:
Timestamp:
Apr 22, 2010, 9:14:14 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
3703147
Parents:
25879a4
Message:

2010-04-22 Joel Sherrill <joel.sherrilL@…>

Location:
rtems-coverage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    r25879a4 r0dba6bf  
     12010-04-22      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * TargetFactory.cc: Strip CPU from target name.
     4
    152010-04-22      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • rtems-coverage/TargetFactory.cc

    r25879a4 r0dba6bf  
    3636     const char    *theTarget;
    3737     //! This is the static wrapper for the constructor.
    38      // XXX Change the calling parameters to "theCtor".
    3938     TargetBase *(*theCtor)(
    4039       std::string
     
    5251    { "arm",     Target_arm_Constructor },
    5352    { "i386",    Target_i386_Constructor },
     53    { "lm32",    Target_lm32_Constructor },
    5454    { "m68k",    Target_m68k_Constructor },
    5555    { "powerpc", Target_powerpc_Constructor },
    56     { "lm32",    Target_lm32_Constructor },
    5756    { "sparc",   Target_sparc_Constructor },
    5857    { "TBD",     NULL },
     
    6362  )
    6463  {
    65     size_t i;
     64    size_t      i;
     65    std::string cpu;
    6666
     67    i = targetName.find( '-' );
     68    if ( i == targetName.npos )
     69      cpu = targetName;
     70    else
     71      cpu = targetName.substr( 0, i );
     72
     73    // fprintf( stderr, "%s --> %s\n", targetName.c_str(), cpu.c_str());
    6774    // Iterate over the table trying to find an entry with a matching name
    6875    for ( i=0 ; i < sizeof(FactoryTable) / sizeof(FactoryEntry_t); i++ ) {
    69       if ( !strcmp(FactoryTable[i].theTarget, targetName.c_str() ) )
    70         return FactoryTable[i].theCtor( targetName );
     76      if ( !strcmp(FactoryTable[i].theTarget, cpu.c_str() ) )
     77        return FactoryTable[i].theCtor( cpu );
    7178    }
    7279
     
    7481      stderr,
    7582      "ERROR!!! %s is not a known architecture!!!\n",
    76       targetName.c_str()
     83      cpu.c_str()
    7784    );
    7885    fprintf( stderr, "-- fix me\n" );
Note: See TracChangeset for help on using the changeset viewer.