Changeset 997cdd6 in rtems-testing


Ignore:
Timestamp:
May 24, 2010, 8:10:31 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
d8b4ff2
Parents:
a518bc5
Message:

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

  • CoverageReaderTSIM.cc: Add branch coverage to TSIM. Only on erc32 and leon3 at this time.
  • ChangeLog?: New file.
Location:
covoar
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • covoar/CoverageReaderTSIM.cc

    ra518bc5 r997cdd6  
    1414#include <sys/stat.h>
    1515
     16#include "app_common.h"
    1617#include "CoverageReaderTSIM.h"
    1718#include "CoverageMap.h"
     
    2223  CoverageReaderTSIM::CoverageReaderTSIM()
    2324  {
     25
    2426  }
    2527
     
    6365
    6466      for (i=0; i < 0x80; i+=4) {
     67        unsigned int a;
    6568        status = fscanf( coverageFile, "%d", &cover );
    6669        if (status == EOF || status == 0) {
     
    7881        // mark the address as executed.
    7982        //
     83        a = baseAddress + i;
     84        aCoverageMap = executableInformation->getCoverageMap( a );
     85        if (!aCoverageMap)
     86          continue;
    8087        if (cover & 1) {
    81           aCoverageMap = executableInformation->getCoverageMap(
    82             baseAddress + i
    83           );
    84           if (aCoverageMap) {
    85             aCoverageMap->setWasExecuted( baseAddress + i );
    86             aCoverageMap->setWasExecuted( baseAddress + i + 1 );
    87             aCoverageMap->setWasExecuted( baseAddress + i + 2 );
    88             aCoverageMap->setWasExecuted( baseAddress + i + 3 );
     88          aCoverageMap->setWasExecuted( a );
     89          aCoverageMap->setWasExecuted( a + 1 );
     90          aCoverageMap->setWasExecuted( a + 2 );
     91          aCoverageMap->setWasExecuted( a + 3 );
     92          if ( cover & 0x10 ) {
     93            aCoverageMap->setWasTaken( a );
     94            BranchInfoAvailable = true;
     95          } else if ( cover & 0x20 ) {
     96            aCoverageMap->setWasNotTaken( a );
     97            BranchInfoAvailable = true;
    8998          }
    9099        }
Note: See TracChangeset for help on using the changeset viewer.