Changeset af4279e in rtems-testing


Ignore:
Timestamp:
May 11, 2010, 8:18:32 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
c356a9b
Parents:
e0aaa1c
Message:

2010-05-11 Joel Sherrill <joel.sherrilL@…>

Location:
rtems-coverage
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    re0aaa1c raf4279e  
     12010-05-11      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * DesiredSymbols.cc, Makefile, ObjdumpProcessor.cc, TargetBase.cc,
     4        TargetBase.h, TraceConverter.cc, app_common.cc, app_common.h,
     5        covmerge.cc, covoar.cc: Merge Toolname into Target.
     6        * Toolnames.cc, Toolnames.h: Removed.
     7
    182010-05-11      Joel Sherrill <joel.sherrilL@OARcorp.com>
    29
  • rtems-coverage/DesiredSymbols.cc

    re0aaa1c raf4279e  
    372372      command,
    373373      "%s -e %s <%s | dos2unix >%s",
    374       Tools->getAddr2line(),
     374      TargetInfo->getAddr2line(),
    375375      executableFileName.c_str(),
    376376      "ranges1.tmp",
  • rtems-coverage/Makefile

    re0aaa1c raf4279e  
    3838  Target_powerpc.o \
    3939  Target_sparc.o \
    40   Toolnames.o
    4140
    4241TRACECONVERTER_OBJS = \
     
    135134Target_powerpc.o: Target_powerpc.cc Target_powerpc.h TargetBase.h
    136135Target_sparc.o: Target_sparc.cc Target_sparc.h TargetBase.h
    137 Toolnames.o: Toolnames.cc Toolnames.h
    138136
    139137TraceConverter.o: TraceConverter.cc TraceReaderBase.h TraceList.h
  • rtems-coverage/ObjdumpProcessor.cc

    re0aaa1c raf4279e  
    141141        buffer,
    142142        "%s -da --section=.text --source %s | sed -e \'s/ *$//\' >%s",
    143         Tools->getObjdump(),
     143        TargetInfo->getObjdump(),
    144144         exeFileName.c_str(),
    145145        dumpFile
  • rtems-coverage/TargetBase.cc

    re0aaa1c raf4279e  
    2323    targetName_m( targetName )
    2424  {
     25    int i;
     26    std::string front = "";
     27
     28    for (i=0 ; targetName_m[i] && targetName_m[i] != '-' ; ) {
     29      cpu_m[i]   = targetName_m[i];
     30      cpu_m[++i] = '\0';
     31    }
     32    if (targetName_m[i] == '-')
     33      front = targetName_m + "-";
     34
     35
     36    addr2line_m = front + "addr2line";
     37    nm_m        = front + "nm";
     38    objdump_m   = front + "objdump";
    2539  }
    2640
    2741  TargetBase::~TargetBase()
    2842  {
     43  }
     44
     45  const char* TargetBase::getAddr2line() const
     46  {
     47    return addr2line_m.c_str();
     48  }
     49
     50  const char* TargetBase::getCPU( void ) const
     51  {
     52    return cpu_m.c_str();
     53  }
     54
     55  const char* TargetBase::getNm() const
     56  {
     57    return nm_m.c_str();
     58  }
     59
     60  const char* TargetBase::getObjdump() const
     61  {
     62    return objdump_m.c_str();
     63  }
     64
     65  const char* TargetBase::getTarget( void ) const
     66  {
     67    return targetName_m.c_str();
    2968  }
    3069
  • rtems-coverage/TargetBase.h

    re0aaa1c raf4279e  
    3030    /*!
    3131     *  This method constructs an TargetBase instance.
     32     *
     33     *  @param[in] targetName specifies the desired target
    3234     */
    33     TargetBase( std::string targetName );
     35    TargetBase(
     36      std::string targetName
     37    );
    3438
    3539    /*!
     
    3741     */
    3842    virtual ~TargetBase();
     43
     44    /*!
     45     *  This method returns the program name for addr2line.
     46     *
     47     *  @return Returns the target specific addr2line program name
     48     */
     49    const char* getAddr2line( void ) const;
     50
     51    /*!
     52     *  This method returns the CPU name.
     53     *
     54     *  @return Returns the target cpu name
     55     */
     56    const char* getCPU( void ) const;
     57
     58    /*!
     59     *  This method returns the program name for nm.
     60     *
     61     *  @return Returns the target specific nm program name
     62     */
     63    const char* getNm( void ) const;
     64
     65    /*!
     66     *  This method returns the program name for objdump.
     67     *
     68     *  @return Returns the target specific objdump program name
     69     */
     70    const char* getObjdump( void ) const;
     71
     72    /*!
     73     *  This method returns the target name.
     74     *
     75     *  @return Returns the target name
     76     */
     77    const char* getTarget( void ) const;
    3978
    4079    /*!
     
    112151     */
    113152    std::list <std::string> branchInstructions;
     153
     154  private:
     155
     156    /*!
     157     * This member variable contains the name of the host program
     158     * which reports the source line for the specified program address.
     159     */
     160    std::string addr2line_m;
     161
     162    /*!
     163     * This member variable contains the name of the target cpu architecture.
     164     */
     165    std::string cpu_m;
     166
     167    /*!
     168     * This member variable contains the name of the host program
     169     * which produces a symbol table.
     170     */
     171    std::string nm_m;
     172
     173    /*!
     174     * This member variable contains the name of the host program
     175     * which disassembles an executable or library.
     176     */
     177    std::string objdump_m;
    114178  };
    115179}
  • rtems-coverage/TraceConverter.cc

    re0aaa1c raf4279e  
    2121#include "TraceList.h"
    2222#include "ObjdumpProcessor.h"
    23 #include "Toolnames.h"
    2423#include "app_common.h"
    2524#include "TargetFactory.h"
     
    8382
    8483  // Create toolnames.
    85   Tools = new Coverage::Toolnames( cpuname );
    8684  TargetInfo = Target::TargetFactory( cpuname );
    8785
  • rtems-coverage/app_common.cc

    re0aaa1c raf4279e  
    1212#include "app_common.h"
    1313#include "DesiredSymbols.h"
    14 #include "Toolnames.h"
    1514#include "Explanations.h"
    1615
     
    2120Coverage::ObjdumpProcessor* objdumpProcessor    = NULL;
    2221Coverage::DesiredSymbols*   SymbolsToAnalyze    = NULL;
    23 Coverage::Toolnames*        Tools               = NULL;
    2422bool                        Verbose             = false;
    2523const char*                 outputDirectory     = ".";
  • rtems-coverage/app_common.h

    re0aaa1c raf4279e  
    1010#include "DesiredSymbols.h"
    1111#include "Explanations.h"
    12 #include "Toolnames.h"
    1312#include "TargetBase.h"
    1413
     
    1615extern Coverage::ObjdumpProcessor*  objdumpProcessor;
    1716extern Coverage::DesiredSymbols*    SymbolsToAnalyze;
    18 extern Coverage::Toolnames*         Tools;
    1917extern bool                         Verbose;
    2018extern const char*                  outputDirectory;
  • rtems-coverage/covmerge.cc

    re0aaa1c raf4279e  
    4848Coverage::CoverageReaderBase *CoverageReader   = NULL;
    4949Coverage::CoverageWriterBase *CoverageWriter   = NULL;
    50 Coverage::Toolnames          *Tools            = NULL;
    5150Coverage::ObjdumpProcessor   *ObjdumpProcessor = NULL;
    5251Coverage::CoverageRanges     *Ranges           = NULL;
     
    353352   *  Create toolnames based on target
    354353   */
    355   Tools = new Coverage::Toolnames( target );
     354  TargetInfo = Target::TargetFactory( target );
    356355
    357356  /*
  • rtems-coverage/covoar.cc

    re0aaa1c raf4279e  
    273273
    274274  // Create toolnames based on target.
    275   Tools      = new Coverage::Toolnames( target );
    276275  TargetInfo = Target::TargetFactory( target );
    277276
Note: See TracChangeset for help on using the changeset viewer.