[PATCH rtems-tools v2 5/7] TraceWriterQEMU.cc: Fix formatting
Chris Johns
chrisj at rtems.org
Fri Sep 24 02:21:29 UTC 2021
On 24/9/21 7:27 am, Ryan Long wrote:
> ---
> tester/covoar/TraceWriterQEMU.cc | 47 +++++++++++++++++++++++++---------------
> 1 file changed, 29 insertions(+), 18 deletions(-)
>
> diff --git a/tester/covoar/TraceWriterQEMU.cc b/tester/covoar/TraceWriterQEMU.cc
> index d14260f..1f0e719 100644
> --- a/tester/covoar/TraceWriterQEMU.cc
> +++ b/tester/covoar/TraceWriterQEMU.cc
> @@ -60,9 +60,9 @@ namespace Trace {
> }
>
> bool TraceWriterQEMU::writeFile(
> - const std::string& file,
> - Trace::TraceReaderBase *log,
> - bool verbose
> + const std::string& file,
> + Trace::TraceReaderBase* log,
> + bool verbose
> )
> {
> struct trace_header header;
> @@ -96,13 +96,13 @@ namespace Trace {
> //
> // Write the Header to the file
> //
> - strncpy( header.magic, QEMU_TRACE_MAGIC, sizeof(header.magic) );
> - header.version = QEMU_TRACE_VERSION;
> - header.kind = QEMU_TRACE_KIND_RAW; // XXX ??
> + strncpy( header.magic, QEMU_TRACE_MAGIC, sizeof( header.magic ) );
> + header.version = QEMU_TRACE_VERSION;
> + header.kind = QEMU_TRACE_KIND_RAW; // XXX ??
> header.sizeof_target_pc = 32;
> - header.big_endian = false;
> - header.machine[0] = 0; // XXX ??
> - header.machine[1] = 0; // XXX ??
> + header.big_endian = false;
> + header.machine[0] = 0; // XXX ??
> + header.machine[1] = 0; // XXX ??
>
> traceFile.write( (char *) &header, sizeof( trace_header ) );
> if ( traceFile.fail() ) {
> @@ -110,35 +110,42 @@ namespace Trace {
> return false;
> }
>
> - if (verbose)
> + if ( verbose ) {
> std::cerr << "magic = " << QEMU_TRACE_MAGIC << std::endl
> << "version = " << header.version << std::endl
> << "kind = " << header.kind << std::endl
> << "sizeof_target_pc = " << header.sizeof_target_pc << std::endl
> << "big_endian = " << header.big_endian << std::endl
> - << std::hex << std::setfill('0')
> - << "machine = " << std::setw(2) << header.machine[0]
> + << std::hex << std::setfill( '0' )
> + << "machine = " << std::setw( 2 ) << header.machine[0]
> << ':' << header.machine[1]
> - << std::dec << std::setfill(' ')
> + << std::dec << std::setfill( ' ' )
> << std::endl;
> + }
>
> //
> // Loop through log and write each entry.
> //
>
> <<<<<<< HEAD
> +<<<<<<< HEAD
> for (const auto & itr : log->Trace.set) {
> struct trace_entry32 entry;
> =======
> for ( const auto& itr : log->Trace.set ) {
> struct trace_entry32 entry;
> >>>>>>> cdf7855... TraceWriterQEMU.cc: Fix
> +=======
> + for ( const auto & itr : log->Trace.set ) {
> + struct trace_entry32 entry;
> +>>>>>>> 4d16457... TraceWriterQEMU.cc: Fix formatting
This looks broken? Did the patch build?
Have you built the patch?
Chris
More information about the devel
mailing list