summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex White <alex.white@oarcorp.com>2021-06-02 09:22:51 -0500
committerJoel Sherrill <joel@rtems.org>2021-06-04 14:24:55 -0500
commitc17664fb7b95f16e7012e4bbcbfd301e7a58b3a8 (patch)
treecb18d8a64f7ad5ee4fff32b4a4eb5328c9023ee8
parentReportsBase.cc: Fix Resource leak (diff)
downloadrtems-tools-c17664fb7b95f16e7012e4bbcbfd301e7a58b3a8.tar.bz2
covoar: Fix single-byte uncovered ranges
This fixes a bug where covoar reports uncovered ranges of size 1. When a NOP instruction is encountered at the end of a function, the remaining non-instruction bytes are marked as executed. The loop that marks the remaining bytes as executed was not considering the last address of the function. Closes #4448
-rw-r--r--tester/covoar/DesiredSymbols.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
index 5278891..caa6acd 100644
--- a/tester/covoar/DesiredSymbols.cc
+++ b/tester/covoar/DesiredSymbols.cc
@@ -252,7 +252,7 @@ namespace Coverage {
do {
theCoverageMap->setWasExecuted( ha );
ha++;
- if ( ha >= endAddress )
+ if ( ha > endAddress )
break;
} while ( !theCoverageMap->isStartOfInstruction( ha ) ||
theCoverageMap->isNop( ha ) );