summaryrefslogtreecommitdiffstats
path: root/tester/covoar/SymbolTable.cc
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-05-11 14:24:11 +1200
committerChris Johns <chrisj@rtems.org>2018-06-18 12:26:16 +1000
commit881824f766937a47fb494f97f4ebcd44c99135cc (patch)
tree0af3d9422ba8e0eae6df8458cc08d4aafacff301 /tester/covoar/SymbolTable.cc
parentlinkers/exe-info: Add DWARF support to gather and check producer details. (diff)
downloadrtems-tools-881824f766937a47fb494f97f4ebcd44c99135cc.tar.bz2
tester/covoar: Remove all exit() calls and throw an rld::error exception.
Add a suitable catch to covoar's main.
Diffstat (limited to 'tester/covoar/SymbolTable.cc')
-rw-r--r--tester/covoar/SymbolTable.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/tester/covoar/SymbolTable.cc b/tester/covoar/SymbolTable.cc
index 062e0a3..53bc8af 100644
--- a/tester/covoar/SymbolTable.cc
+++ b/tester/covoar/SymbolTable.cc
@@ -10,6 +10,8 @@
#include <stdlib.h>
#include <string.h>
+#include <rld.h>
+
#include "SymbolTable.h"
#include "app_common.h"
@@ -43,16 +45,16 @@ namespace Coverage {
// Add an entry to the symbol information map.
symbolData.startingAddress = start;
symbolData.length = length;
-
+
if ( info[ symbol ].empty() == false ) {
if ( info[ symbol ].front().length != length ) {
- fprintf(stderr,
- "ERROR==> Different lengths for the symbol %s (%d and %d)\n",
- symbol.c_str(),
- info[ symbol ].front().length,
- length
- );
- exit( 0 );
+ std::ostringstream what;
+ what << "Different lengths for the symbol "
+ << symbol
+ << " (" << info[ symbol ].front().length
+ << " and " << length
+ << ")";
+ throw rld::error( what, "SymbolTable::addSymbol" );
}
}