summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-10-28 12:54:06 -0400
committerJoel Sherrill <joel@rtems.org>2021-11-04 10:46:43 -0500
commitd1df4f6e02fe22d2cb542adbd6ba4248ee077892 (patch)
treed6962987b3b8ffcb089837b429c064594219f721
parentba4648bf683fb4acb521f8933b34b80cb4f67cbd (diff)
downloadrtems-tools-d1df4f6e02fe22d2cb542adbd6ba4248ee077892.tar.bz2
TraceConverter.cc: Add catch for exception
CID 1471639: Add catch for exception Closes #4501
-rw-r--r--tester/covoar/TraceConverter.cc22
1 files changed, 18 insertions, 4 deletions
diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc
index 4a24bd4..7770b11 100644
--- a/tester/covoar/TraceConverter.cc
+++ b/tester/covoar/TraceConverter.cc
@@ -174,10 +174,24 @@ int main(
}
// If a dynamic library was specified, determine the load address.
- if ( !dynamicLibrary.empty() )
- executableInfo->setLoadAddress(
- objdumpProcessor.determineLoadAddress( executableInfo )
- );
+ if ( !dynamicLibrary.empty() ) {
+ try
+ {
+ executableInfo->setLoadAddress(
+ objdumpProcessor.determineLoadAddress( executableInfo )
+ );
+ }
+ catch ( rld::error re )
+ {
+ std::cerr << "error: "
+ << re.where << ": " << re.what
+ << std::endl;
+ ec = 10;
+
+ return ec;
+ }
+ }
+
objdumpProcessor.loadAddressTable( executableInfo, objdumpFile, err );
log.processFile( logname, objdumpProcessor );
trace.writeFile( tracefile, &log, verbose );