diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-09-12 12:11:04 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-09-12 12:11:04 -0500 |
commit | 5c981b26bb518ac002c7d143c2aa7c3fb8b8652e (patch) | |
tree | 152453b05b45613208b5876a5daeecb412b8dd78 | |
parent | DesiredSymbols.cc::computeUncovered: Ensure all bytes in a NOP are marked as ... (diff) | |
download | rtems-testing-5c981b26bb518ac002c7d143c2aa7c3fb8b8652e.tar.bz2 |
ObjdumpProcessor.cc: Fix single NOP instructions for alignment bug
finalizeSymbol() must account for only a single instruction being
added at the end of a method for alignment purposes. This requires
using a different form of the erase() method.
-rw-r--r-- | covoar/ObjdumpProcessor.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/covoar/ObjdumpProcessor.cc b/covoar/ObjdumpProcessor.cc index f02f2ca..486c720 100644 --- a/covoar/ObjdumpProcessor.cc +++ b/covoar/ObjdumpProcessor.cc @@ -75,7 +75,10 @@ namespace Coverage { // Erase trailing nops. The erase operation wants the first // parameter to point to the first item to erase and the second // parameter to point to the item beyond the last item to erase. - instructions.erase( fnop, ++lnop ); + if ( fnop == lnop ) + instructions.erase( fnop ); + else + instructions.erase( fnop, ++lnop ); } // If there are NOT already saved instructions, save them. |