From 5c981b26bb518ac002c7d143c2aa7c3fb8b8652e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 12 Sep 2012 12:11:04 -0500 Subject: 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. --- covoar/ObjdumpProcessor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3