Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion::CodeTraceComparator Class Reference

This class is used to compare data held in two different trace files with various methods. More...

#include <code_trace_analysis.hpp>

Public Member Functions

 CodeTraceComparator (std::string trace_path1, std::string trace_path2)
 
void merge_at_address (ADDR addr)
 
void merge_at_offset (std::string name, uint32_t off)
 
void search_uneq_hit_offset (COMPARATOR_HIT_CALLBACK callback, bool reset_cursors=true)
 
void search_uneq_hit_offset_mod (COMPARATOR_HIT_CALLBACK callback, std::string name, bool reset_cursors=true)
 
void search_uneq_reg (COMPARATOR_HIT_CALLBACK callback, bool reset_cursors=true)
 

Private Attributes

CodeTraceReader reader1
 The CodeTraceReader used to parse the first trace file.
 
CodeTraceReader reader2
 The CodeTraceReader used to parse the second trace file.
 

Detailed Description

This class is used to compare data held in two different trace files with various methods.

Constructor & Destructor Documentation

◆ CodeTraceComparator()

arion::CodeTraceComparator::CodeTraceComparator ( std::string  trace_path1,
std::string  trace_path2 
)

Builder instance for CodeTraceComparator instances.

Parameters
[in]trace_path1Path to the first trace file.
[in]trace_path1Path to the second trace file.

Member Function Documentation

◆ merge_at_address()

void arion::CodeTraceComparator::merge_at_address ( ADDR  addr)

Tells the underlying readers to advance until they reach a given PC address in a hit.

Parameters
[in]addrThe address to reach.

◆ merge_at_offset()

void arion::CodeTraceComparator::merge_at_offset ( std::string  name,
uint32_t  off 
)

Tells the underlying readers to advance until they reach a given PC offset from a module start in a hit.

Parameters
[in]nameName of the module to compute the offset from. @parma[in] off The offset to reach.

◆ search_uneq_hit_offset()

void arion::CodeTraceComparator::search_uneq_hit_offset ( COMPARATOR_HIT_CALLBACK  callback,
bool  reset_cursors = true 
)

Calls the callback when the hits from the trace files contain a different PC module offset.

Parameters
[in]callbackThe callback to be called when a different PC module offset is reached.
[in]reset_cursorsWhether the cursors of the underlying readers should be reset to the top of the trace files.

◆ search_uneq_hit_offset_mod()

void arion::CodeTraceComparator::search_uneq_hit_offset_mod ( COMPARATOR_HIT_CALLBACK  callback,
std::string  name,
bool  reset_cursors = true 
)

Calls the callback when the hits from the trace files contain a different PC module offset in a given module.

Parameters
[in]callbackThe callback to be called when a different PC module offset is reached in the module.
[in]nameName of the module to be processed.
[in]reset_cursorsWhether the cursors of the underlying readers should be reset to the top of the trace files.

◆ search_uneq_reg()

void arion::CodeTraceComparator::search_uneq_reg ( COMPARATOR_HIT_CALLBACK  callback,
bool  reset_cursors = true 
)

Calls the callback when the hits from the trace files contain a different context register value. Only makes sense for files generated with TRACE_MODE::CTXT.

Parameters
[in]callbackThe callback to be called when a different context register value is reached.
[in]reset_cursorsWhether the cursors of the underlying readers should be reset to the top of the trace files.

Member Data Documentation

◆ reader1

CodeTraceReader arion::CodeTraceComparator::reader1
private

The CodeTraceReader used to parse the first trace file.

◆ reader2

CodeTraceReader arion::CodeTraceComparator::reader2
private

The CodeTraceReader used to parse the second trace file.


The documentation for this class was generated from the following file: