diff options
author | Ryan Long <ryan.long@oarcorp.com> | 2021-09-27 09:54:55 -0400 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-12-07 10:49:34 -0600 |
commit | 10d33a6333ead8f1f717ee93533f5922e8bd503b (patch) | |
tree | 25b548e5fc2455b49c5ad8255df3e45c6dc24761 | |
parent | TraceConverter.cc: Fix formatting (diff) | |
download | rtems-tools-10d33a6333ead8f1f717ee93533f5922e8bd503b.tar.bz2 |
TraceList.cc: Convert from C to C++
-rw-r--r-- | tester/covoar/TraceList.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tester/covoar/TraceList.cc b/tester/covoar/TraceList.cc index a4e29e6..51ecfd8 100644 --- a/tester/covoar/TraceList.cc +++ b/tester/covoar/TraceList.cc @@ -1,5 +1,6 @@ #include "TraceList.h" -#include <stdio.h> +#include <iostream> +#include <iomanip> namespace Trace { @@ -20,7 +21,7 @@ namespace Trace { traceRange_t t; t.lowAddress = lowAddressArg; - t.length = highAddressArg - lowAddressArg; + t.length = highAddressArg - lowAddressArg; t.exitReason = why; set.push_back( t ); @@ -28,12 +29,9 @@ namespace Trace { void TraceList::ShowTrace( traceRange_t *t) { - printf( - "Start 0x%x, length 0x%03x Reason %d\n", - t->lowAddress, - t->length, - t->exitReason - ); + std::cout << std::hex << "Start 0x" << t->lowAddress + << ", length 0x" << std::setfill( '0' ) << std::setw( 3 ) + << t->length << " Reason " << t->exitReason << std::endl; } void TraceList::ShowList() |