From 10d33a6333ead8f1f717ee93533f5922e8bd503b Mon Sep 17 00:00:00 2001 From: Ryan Long Date: Mon, 27 Sep 2021 09:54:55 -0400 Subject: TraceList.cc: Convert from C to C++ --- tester/covoar/TraceList.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tester/covoar') 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 +#include +#include 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() -- cgit v1.2.3