Changeset 851f8cf in rtems-testing


Ignore:
Timestamp:
Jan 24, 2011, 9:11:25 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
ccbc6aa
Parents:
ef03027
Message:

2011-01-24 Joel Sherrill <joel.sherrilL@…>

  • CoverageReaderQEMU.cc: Finetune debug.
Location:
covoar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • covoar/ChangeLog

    ref03027 r851f8cf  
     12011-01-24      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * CoverageReaderQEMU.cc: Finetune debug.
     4
    152011-01-24      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • covoar/CoverageReaderQEMU.cc

    ref03027 r851f8cf  
    140140        }
    141141
    142        // Determine if additional branch information is available.
    143        if ( (entry->op & branchInfo) != 0 ) {
     142        // Determine if additional branch information is available.
     143        if ( (entry->op & branchInfo) != 0 ) {
    144144          unsigned int a = entry->pc + entry->size - 1;
    145 if ( (entry->pc < aCoverageMap->getLowAddress()) ||
    146      (entry->pc > aCoverageMap->getHighAddress()) )
    147   fprintf( stderr, "*** entry PC of trace block is too low\n" );
    148 
    149 if ( (a < aCoverageMap->getLowAddress()) ||
    150      (a > aCoverageMap->getHighAddress()) )
    151   fprintf( stderr, "*** last byte of trace block is too high\n" );
    152 
    153           while (!aCoverageMap->isStartOfInstruction(a))
    154             a--;
    155           if (entry->op & taken) {
    156             aCoverageMap->setWasTaken( a );
    157           } else if (entry->op & notTaken) {
    158             aCoverageMap->setWasNotTaken( a );
     145          if ( (entry->pc < aCoverageMap->getLowAddress()) ||
     146               (entry->pc > aCoverageMap->getHighAddress()) ||
     147               (a < aCoverageMap->getLowAddress()) ||
     148               (a > aCoverageMap->getHighAddress()) ) {
     149            fprintf(
     150              stderr,
     151              "*** Trace block is inconsistent with coverage map\n"
     152              "*** Trace block (0x%08x - 0x%08x) for %d bytes\n"
     153              "*** Coverage map (0x%08x - 0x%08x) for %d bytes\n",
     154              entry->pc,
     155              a,
     156              entry->size,
     157              aCoverageMap->getLowAddress(),
     158              aCoverageMap->getHighAddress(),
     159              aCoverageMap->getHighAddress() - aCoverageMap->getLowAddress()
     160           );
     161          } else {
     162            while (!aCoverageMap->isStartOfInstruction(a))
     163              a--;
     164            if (entry->op & taken) {
     165              aCoverageMap->setWasTaken( a );
     166            } else if (entry->op & notTaken) {
     167              aCoverageMap->setWasNotTaken( a );
     168            }
    159169          }
    160         }
     170        }
    161171      }
    162172    }
    163 
    164173    fclose( traceFile );
    165174  }
Note: See TracChangeset for help on using the changeset viewer.