summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-12 17:11:04 (UTC)
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-12 17:11:04 (UTC)
commit5c981b26bb518ac002c7d143c2aa7c3fb8b8652e (patch)
tree152453b05b45613208b5876a5daeecb412b8dd78
parent6de122e4d3d4037865970d2fa12aab57ee1eb1c4 (diff)
downloadrtems-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.cc5
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.