winIDEA SDK
isys::CTraceConfigWizard Class Reference

Description

This class can be used to configure trace in a similar way as it is done via GUI wizard.

To get instance of this class, use one of the static factory methods.

Python example

#include <CTraceConfigWizard.h>

Public Types

enum  EAccessType {
  ERead , EWrite ,
  EReadWrite
}
 Variable access type. More...
 
enum  EDataWidthType {
  EWidthAny , EWidth1 ,
  EWidth2 , EWidth4
}
 Data width type. More...
 
enum  EEdgeType { ERisingEdge , EFallingEdge , EAUXState }
 Edge type for AUX trace trigger. More...
 
enum  ERecordingContent {
  ERecordEverything , ERecordProgramFlow ,
  ERecordDataAccess , ERecordInstrumentationMsgs
}
 Type of trace recording to perform. More...
 
enum  ESamplesOffset {
  ESamplesBefore , ESamplesAfter ,
  ESamplesBeforeAndAfter
}
 Type of sampling of additional samples. More...
 
enum  ERecordingDuration { EAllTheTime , EBetweenTwoEvents }
 Type of recording duration. More...
 

Public Member Functions

void setRecordingContent (ERecordingContent recType, const std::string &identifierOrStartAddr="", const std::string &identifierOrEndAddr="", EAccessType accessType=EReadWrite)
 If this method is not called, then 'Record Everything' is configured. More...
 
void setRecordingAttibutes (ESamplesOffset samplesOffsetType, ERecordingDuration recordingDuration)
 This method sets additional recording properties. More...
 
void setProcess (const std::string &name)
 This method sets process name. More...
 

Static Public Member Functions

static CTraceConfigWizardSPtr createImmediateTrigger ()
 This method creates trigger configuration equal to selecting 'Trigger Immediately' radio button in trace wizard GUI.
 
static CTraceConfigWizardSPtr createDataAccessTrigger (const std::string &varName, bool isCoverEntireObject, const std::string &endAddress, EAccessType accessType)
 This method creates trigger configuration for data access event. More...
 
static CTraceConfigWizardSPtr createDataAccessTrigger (const std::string &varName, bool isCoverEntireObject, const std::string &endAddress, EAccessType accessType, EDataWidthType dataWidth, DWORD value, DWORD mask)
 This method creates trigger configuration for data access event. More...
 
static CTraceConfigWizardSPtr createCodeExecTrigger (const std::string &funcName)
 This method creates trigger configuration for code execution event. More...
 

Member Enumeration Documentation

◆ EAccessType

Variable access type.

Enumerator
ERead 

read access

EWrite 

write access

EReadWrite 

read-write access

◆ EDataWidthType

Data width type.

Enumerator
EWidthAny 

any width

EWidth1 

width of 1 MAU

EWidth2 

width of 2 MAUs

EWidth4 

width of 4 MAUs

◆ EEdgeType

Edge type for AUX trace trigger.

Enumerator
ERisingEdge 

rising edge

EFallingEdge 

falling edge

◆ ERecordingContent

Type of trace recording to perform.

Enumerator
ERecordEverything 

record everything

ERecordProgramFlow 

record program flow

ERecordDataAccess 

record data access

ERecordInstrumentationMsgs 

record instrumentation messages OTM/ITM

◆ ERecordingDuration

Type of recording duration.

Enumerator
EAllTheTime 

record all the time

EBetweenTwoEvents 

record between two events

◆ ESamplesOffset

Type of sampling of additional samples.

Enumerator
ESamplesBefore 

record few samples before

ESamplesAfter 

record few samples after

ESamplesBeforeAndAfter 

record few samples before and after

Member Function Documentation

◆ createCodeExecTrigger()

static CTraceConfigWizardSPtr isys::CTraceConfigWizard::createCodeExecTrigger ( const std::string &  funcName)
static

This method creates trigger configuration for code execution event.

Parameters
funcNamename of a function or literal address, where execution triggers trace recording

Python example

◆ createDataAccessTrigger() [1/2]

static CTraceConfigWizardSPtr isys::CTraceConfigWizard::createDataAccessTrigger ( const std::string &  varName,
bool  isCoverEntireObject,
const std::string &  endAddress,
EAccessType  accessType 
)
static

This method creates trigger configuration for data access event.

Parameters
varNamename of a variable or literal address, where access triggers trace recording
isCoverEntireObjectif true, access to entire object is monitored
endAddressname of variable or literal address, where monitoring for trigger ends
accessTypetype of memory access

◆ createDataAccessTrigger() [2/2]

static CTraceConfigWizardSPtr isys::CTraceConfigWizard::createDataAccessTrigger ( const std::string &  varName,
bool  isCoverEntireObject,
const std::string &  endAddress,
EAccessType  accessType,
EDataWidthType  dataWidth,
DWORD  value,
DWORD  mask 
)
static

This method creates trigger configuration for data access event.

Parameters
varNamename of a variable or literal address, where access triggers trace recording
isCoverEntireObjectif true, access to entire object is monitored
endAddressname of variable or literal address, where monitoring for trigger ends
accessTypetype of memory access
dataWidthdata width type
valuevalue that triggers trace recording
maskbit mask - 0 ignore, 1 consider

◆ setProcess()

void isys::CTraceConfigWizard::setProcess ( const std::string &  name)

This method sets process name.

Parameters
nameprocess name

◆ setRecordingAttibutes()

void isys::CTraceConfigWizard::setRecordingAttibutes ( ESamplesOffset  samplesOffsetType,
ERecordingDuration  recordingDuration 
)

This method sets additional recording properties.

Parameters
samplesOffsetTypedefines any additional samples to record
recordingDurationdefines the recording duration

◆ setRecordingContent()

void isys::CTraceConfigWizard::setRecordingContent ( ERecordingContent  recType,
const std::string &  identifierOrStartAddr = "",
const std::string &  identifierOrEndAddr = "",
EAccessType  accessType = EReadWrite 
)

If this method is not called, then 'Record Everything' is configured.

If more detailed configuration is required, call it for each ERecordingContent, which you want to record.

Parameters
recTypeif set to ERecordEverything, then all other recording settings are reset. Other function parameters are ignored.
identifierOrStartAddrname of function or variable (depending on recType), or literal start address of area to trace
identifierOrEndAddrname of function or variable (depending on recType), or literal end address of area to trace
accessTypememory access type, used only when recType == ERecordDataAccess.