[rtems-testing commit] ObjdumpProcessor.cc: Fix single NOP instructions for alignment bug
Joel Sherrill
joel at rtems.org
Wed Sep 12 17:09:10 UTC 2012
Module: rtems-testing
Branch: master
Commit: 5c981b26bb518ac002c7d143c2aa7c3fb8b8652e
Changeset: http://git.rtems.org/rtems-testing/commit/?id=5c981b26bb518ac002c7d143c2aa7c3fb8b8652e
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Wed Sep 12 12:11:04 2012 -0500
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 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.
More information about the vc
mailing list