winIDEA SDK
isys::CBreakpointController Class Reference

Description

This class controls breakpoints on target.

Python example for method setBP(): test_set_bp.py
Python example for method setHWBP(): test_set_hwbp.py

#include <CBreakpointController.h>

Inheritance diagram for isys::CBreakpointController:
isys::WrapperBase

Public Member Functions

 CBreakpointController (std::shared_ptr< ConnectionMgr > connectionMgr)
 Instantiates object. More...
 
void clear_BP_condition (const CBPInstance &rBP)
 removes breakpoint's condition More...
 
int deleteAll ()
 Deletes all execution breakpoints. More...
 
int deleteAllHWBP ()
 Deletes all hardware breakpoints. More...
 
int deleteBP (const std::string &fileName, int lineNumber)
 Deletes breakpoint at the given location in source code. More...
 
int deleteBP (const std::string &symbolName)
 Deletes breakpoint at the given symbol name. More...
 
int deleteBP (int memArea, ADDRESS_64 address)
 Deletes breakpoint at the given address. More...
 
int deleteHWBP (const std::string &symbolName)
 Deletes hardware breakpoint at the given symbol name. More...
 
int deleteHWBP (int memArea, ADDRESS_64 address)
 Deletes hardware breakpoint at the given address. More...
 
VBPInstances get_BPs ()
 Returns all currently configured BPs. More...
 
int reapplyAll ()
 Reapplies all currently active breakpoints. More...
 
void remove_all_BPs ()
 removes all breakpoints More...
 
void remove_BP (const CBPInstance &rBP)
 removes the breakpoint More...
 
void remove_BPs (const VBPInstances &rvBPs)
 removes the breakpoints More...
 
void set_BP_action (const CBPInstance &rBP, const std::string &rstrActionScript, const std::string &rstrActionScriptParams, bool bShow)
 Sets action to take when BP hits. More...
 
void set_BP_condition (const CBPInstance &rBP, int nConditionCount, const std::string &rstrConditionExpression)
 Sets condition to the breakpoint. More...
 
void set_BP_enabled (const CBPInstance &rBP, bool bEnable)
 Enables / disables the breakpoint. More...
 
void set_BP_process_filter (const CBPInstance &rBP, const std::string &rstrProcessFilter="")
 Sets process filter for a breakpoint. More...
 
CBPInstance set_BP_source (int nLineNumber, const std::string &rstrFileName)
 Sets a breakpoint on a source line. More...
 
CBPInstance set_BP_symbol (const std::string &rstrSymbol)
 Sets a breakpoint on the symbol. More...
 
int setBP (const std::string &symbolName, int conditionCount=0, const std::string &conditionExpression="")
 Sets breakpoint at the given symbol. More...
 
int setBP (int lineNumber, const std::string &fileName, int conditionCount=0, const std::string &conditionExpression="")
 Sets breakpoint at the given location in source code. More...
 
int setBP (int memArea, ADDRESS_64 address, int conditionCount=0, const std::string &conditionExpression="")
 Sets breakpoint at the given address. More...
 
int setEnabled (bool isEnabled, const std::string &fileName, int lineNumber)
 Enables / disables the breakpoint at the given source line. More...
 
int setEnabled (bool isEnabled, const std::string &symbolName)
 Enables / disables the breakpoint at the given symbol name. More...
 
int setEnabled (bool isEnabled, int memArea, ADDRESS_64 address)
 Enables / disables the breakpoint at the given address. More...
 
int setEnabledAll (bool isEnabled)
 Sets enabled status of all breakpoints. More...
 
int setHWBP (DWORD rwAccess, DWORD accessSize, DWORD usedDataBytes, bool isEntireObject, const std::string &symbolName, DWORD data)
 Sets hardware breakpoint on the given variable or symbol. More...
 
int setHWBP (DWORD rwAccess, DWORD accessSize, DWORD usedDataBytes, int memArea, ADDRESS_64 address, DWORD data)
 Sets hardware breakpoint on the given address. More...
 
int setHWEnabled (bool isEnabled, const std::string &symbolName)
 Enables / disables hardware breakpoint at the given symbol name. More...
 
int setHWEnabled (bool isEnabled, int memArea, ADDRESS_64 address)
 Enables / disables hardware breakpoint at the given address. More...
 
int setHWEnabledAll (bool isEnabled)
 Sets enabled status of all hardware breakpoints. More...
 

Constructor & Destructor Documentation

◆ CBreakpointController()

isys::CBreakpointController::CBreakpointController ( std::shared_ptr< ConnectionMgr connectionMgr)

Instantiates object.

Parameters
connectionMgrclass which maintains connection to winIDEA. Connection must be established before this call.

Python example: test_set_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

Member Function Documentation

◆ clear_BP_condition()

void isys::CBreakpointController::clear_BP_condition ( const CBPInstance rBP)

removes breakpoint's condition

Parameters
rBPthe breakpoint handle

Python example: test_clear_bp_condition.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main')

0

bp_ctrl.set_BP_condition(bp_instance, 1, 'main_loop_counter > 10') bp_ctrl.clear_BP_condition(bp_instance)

◆ deleteAll()

int isys::CBreakpointController::deleteAll ( )

Deletes all execution breakpoints.

Returns
0 if OK

Python example: test_delete_all.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_ctrl.deleteAll()

0

◆ deleteAllHWBP()

int isys::CBreakpointController::deleteAllHWBP ( )

Deletes all hardware breakpoints.

Returns
0 if OK

Python example: test_delete_all_hwbp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... True, # monitor all addresses of the symbol ... "main_loop_counter", ... 42) # compare value 0

bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... 0, # main memory space ... 0x20000034, ... 56) # compare value 0

bp_ctrl.deleteAllHWBP()

0

◆ deleteBP() [1/3]

int isys::CBreakpointController::deleteBP ( const std::string &  fileName,
int  lineNumber 
)

Deletes breakpoint at the given location in source code.

Parameters
fileNamename of source code file
lineNumberline number in source file
Returns
0 if operation was successful, 1 if operation was not executed as expected, but the target is in the expected state. For example, if there was no breakpoint at the specified location, then 1 is returned, because it was not removed, but after the method returns there is no breakpoint, as it is expected.

Python example: test_delete_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(19, 'src/main.cpp')

0

bp_ctrl.deleteBP('src/main.cpp', 19)

0

◆ deleteBP() [2/3]

int isys::CBreakpointController::deleteBP ( const std::string &  symbolName)

Deletes breakpoint at the given symbol name.

Parameters
symbolNamename of symbol in target program, for example function name.
Returns
0 if there was breakpoint before this call (it was deleted), 1 if the breakpoint at this location did not exist

Python example: test_delete_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.deleteBP('main')

0

◆ deleteBP() [3/3]

int isys::CBreakpointController::deleteBP ( int  memArea,
ADDRESS_64  address 
)

Deletes breakpoint at the given address.

Parameters
memAreamemory area of the breakpoint
addressaddress of the existing breakpoint
Returns
0 if operation was successful, 1 if operation was not executed as expected, but the target is in the expected state. For example, if there was no breakpoint at the specified location, then 1 is returned, because it was not removed, but after the method returns there is no breakpoint, as it is expected.

Python example: test_delete_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(0, 0x20000000)

0

bp_ctrl.deleteBP(0, 0x20000000)

0

◆ deleteHWBP() [1/2]

int isys::CBreakpointController::deleteHWBP ( const std::string &  symbolName)

Deletes hardware breakpoint at the given symbol name.

Parameters
symbolNamename of symbol in target program, for example function name.
Returns
0 if operation was successful, 1 if there was no breakpoint at the given address or it was disabled.

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... True, # monitor all addresses of the symbol ... "main_loop_counter", ... 42) # compare value 0

bp_ctrl.deleteHWBP("main_loop_counter")

0

◆ deleteHWBP() [2/2]

int isys::CBreakpointController::deleteHWBP ( int  memArea,
ADDRESS_64  address 
)

Deletes hardware breakpoint at the given address.

Parameters
memAreamemory area of the breakpoint
addressaddress of the breakpoint
Returns
0 if operation was successful, 1 if there was no breakpoint at the given address or it was disabled.

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... 0, # main memory space ... 0x20000034, ... 56) # compare value 0

bp_ctrl.deleteHWBP(0, 0x20000034)

0

◆ get_BPs()

VBPInstances isys::CBreakpointController::get_BPs ( )

Returns all currently configured BPs.

Returns
vector of BPs

Python example: test_get_bps.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_instances = bp_ctrl.get_BPs() [bp.location() for bp in bp_instances]

['main', 'main_loop_counter']

◆ reapplyAll()

int isys::CBreakpointController::reapplyAll ( )

Reapplies all currently active breakpoints.

Use this method, if your application has overwritten software breakpoints, for example when the code in RAM is overwritten by target application after download.

Returns
0 on success, throws Exception on error.

Python example: test_reapply_all.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_ctrl.reapplyAll()

0

◆ remove_all_BPs()

void isys::CBreakpointController::remove_all_BPs ( )

removes all breakpoints

Python example: test_remove_all_bps.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_instances = bp_ctrl.get_BPs() [bp.location() for bp in bp_instances]

['main', 'main_loop_counter']

bp_ctrl.remove_all_BPs() bp_instances = bp_ctrl.get_BPs() [bp.location() for bp in bp_instances]

[]

◆ remove_BP()

void isys::CBreakpointController::remove_BP ( const CBPInstance rBP)

removes the breakpoint

Parameters
rBPthe breakpoint handle

Python example: test_remove_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_source(19, 'src/main.cpp') bp_ctrl.remove_BP(bp_instance)

◆ remove_BPs()

void isys::CBreakpointController::remove_BPs ( const VBPInstances rvBPs)

removes the breakpoints

Parameters
rvBPsBP handles to remove

Python example: test_remove_bps.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_instances = bp_ctrl.get_BPs() [bp.location() for bp in bp_instances]

['main', 'main_loop_counter']

bp_ctrl.remove_BPs(bp_instances) bp_instances = bp_ctrl.get_BPs() [bp.location() for bp in bp_instances]

[]

◆ set_BP_action()

void isys::CBreakpointController::set_BP_action ( const CBPInstance rBP,
const std::string &  rstrActionScript,
const std::string &  rstrActionScriptParams,
bool  bShow 
)

Sets action to take when BP hits.

Parameters
rBPthe breakpoint handle
rstrActionScriptpath to the script to execute
rstrActionScriptParamsparameters to pass to rstrActionScript
bShowif set, the script window is shown, otherwise hidden

Python example: test_set_bp_action.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main')

0

script_dir = os.path.normpath(os.path.dirname(file)) bp_action_script = os.path.join(script_dir, "set_bp_symbol_action.py") param = "process_strings"
bp_ctrl.setBP_action(bp_instance, bp_action_script, param, False)

◆ set_BP_condition()

void isys::CBreakpointController::set_BP_condition ( const CBPInstance rBP,
int  nConditionCount,
const std::string &  rstrConditionExpression 
)

Sets condition to the breakpoint.

Parameters
rBPthe breakpoint handle
nConditionCountthe number of times condition has to be met for breakpoint to trigger
rstrConditionExpressioncondition that has to be met for breakpoint to trigger

Python example: test_set_bp_condition.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main')

0

bp_ctrl.set_BP_condition(bp_instance, 1, 'main_loop_counter > 10')

◆ set_BP_enabled()

void isys::CBreakpointController::set_BP_enabled ( const CBPInstance rBP,
bool  bEnable 
)

Enables / disables the breakpoint.

Parameters
rBPthe breakpoint handle
bEnableset to true to enable the breakpoint, false to disable it

Python example: test_set_bp_enabled.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main')

0

bp_ctrl.set_BP_enabled(bp_instance, True) bp_ctrl.set_BP_enabled(bp_instance, False)

◆ set_BP_process_filter()

void isys::CBreakpointController::set_BP_process_filter ( const CBPInstance rBP,
const std::string &  rstrProcessFilter = "" 
)

Sets process filter for a breakpoint.

Parameters
rBPthe breakpoint handle
rstrProcessFilterthe process filter string

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main')

0

bp_ctrl.set_BP_process_filter(bp_instance, 'App/CORE0')

◆ set_BP_source()

CBPInstance isys::CBreakpointController::set_BP_source ( int  nLineNumber,
const std::string &  rstrFileName 
)

Sets a breakpoint on a source line.

Parameters
nLineNumberline number of the breakpoint
rstrFileNamefile name
Returns
the breakpoint handle

Python example: test_set_bp_source.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_source(19, 'src/main.cpp') bp_instance.location()

'"src\\main.cpp"::19'

◆ set_BP_symbol()

CBPInstance isys::CBreakpointController::set_BP_symbol ( const std::string &  rstrSymbol)

Sets a breakpoint on the symbol.

Parameters
rstrSymbolname of the symbol to set a BP to
Returns
the breakpoint handle

Python example: test_set_bp_symbol.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_instance = bp_ctrl.set_BP_symbol('main_loop_counter') bp_instance.location()

'main_loop_counter'

◆ setBP() [1/3]

int isys::CBreakpointController::setBP ( const std::string &  symbolName,
int  conditionCount = 0,
const std::string &  conditionExpression = "" 
)

Sets breakpoint at the given symbol.

Parameters
symbolNamename of symbol in target program, for example function name.
conditionCountthe number of times condition has to be met for breakpoint to trigger
conditionExpressioncondition that has to be met for breakpoint to trigger
Returns
0 if there was no breakpoint before this call, 1 if the breakpoint at this location was already set

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main', 0, '')

1

Python example: test_set_bp.py

◆ setBP() [2/3]

int isys::CBreakpointController::setBP ( int  lineNumber,
const std::string &  fileName,
int  conditionCount = 0,
const std::string &  conditionExpression = "" 
)

Sets breakpoint at the given location in source code.

Parameters
lineNumberline number in source file
fileNamename of source code file
conditionCountthe number of times condition has to be met for breakpoint to trigger
conditionExpressioncondition that has to be met for breakpoint to trigger
Returns
0 if there was no breakpoint before this call, 1 if the breakpoint at this location was already set

Python example: test_set_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(19, 'src/main.cpp', 0, '')

0

bp_ctrl.setBP(19, 'src/main.cpp', 0, '')

1

◆ setBP() [3/3]

int isys::CBreakpointController::setBP ( int  memArea,
ADDRESS_64  address,
int  conditionCount = 0,
const std::string &  conditionExpression = "" 
)

Sets breakpoint at the given address.

Parameters
memAreamemory area of the breakpoint
addressaddress to set the breakpoint
conditionCountthe number of times condition has to be met for breakpoint to trigger
conditionExpressioncondition that has to be met for breakpoint to trigger
Returns
0 if there was no breakpoint before this call, 1 if the breakpoint at this location was already set

Python example: test_set_bp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(0, 0x20000000, 0, '')

0

bp_ctrl.setBP(0, 0x20000000, 0, '')

1

◆ setEnabled() [1/3]

int isys::CBreakpointController::setEnabled ( bool  isEnabled,
const std::string &  fileName,
int  lineNumber 
)

Enables / disables the breakpoint at the given source line.

Parameters
isEnabledset to true to enable the breakpoint, false to disable it
fileNamename of source code file
lineNumberline number in source file
Returns
0 if breakpoint is enabled after the call, regardless of previous state.

Python example: test_set_enabled.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(19, 'src/main.cpp')

0

bp_ctrl.setEnabled(False, 'src/main.cpp', 19)

0

bp_ctrl.setEnabled(True, 'src/main.cpp', 19)

0

◆ setEnabled() [2/3]

int isys::CBreakpointController::setEnabled ( bool  isEnabled,
const std::string &  symbolName 
)

Enables / disables the breakpoint at the given symbol name.

Parameters
isEnabledset to true to enable the breakpoint, false to disable it
symbolNamename of symbol in target program, for example function name.
Returns
0 if breakpoint is enabled after the call, regardless of previous state.

Python example: test_set_enabled.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP('main')

0

bp_ctrl.setEnabled(False, 'main')

0

bp_ctrl.setEnabled(True, 'main')

0

◆ setEnabled() [3/3]

int isys::CBreakpointController::setEnabled ( bool  isEnabled,
int  memArea,
ADDRESS_64  address 
)

Enables / disables the breakpoint at the given address.

Parameters
isEnabledset to true to enable the breakpoint, false to disable it
memAreamemory area of the breakpoint
addressaddress of the breakpoint
Returns
0 if breakpoint is enabled after the call, regardless of previous state.

Python example: test_set_enabled.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setBP(0, 0x20000000)

0

bp_ctrl.setEnabled(False, 0, 0x20000000)

0

bp_ctrl.setEnabled(True, 0, 0x20000000)

0

◆ setEnabledAll()

int isys::CBreakpointController::setEnabledAll ( bool  isEnabled)

Sets enabled status of all breakpoints.

Parameters
isEnabledset to true to enable breakpoints, false to disable them

Python example: test_set_enabled_all.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

bp_ctrl.setBP('main')

0

bp_ctrl.setBP('main_loop_counter')

0

bp_ctrl.setEnabledAll(True)

0

◆ setHWBP() [1/2]

int isys::CBreakpointController::setHWBP ( DWORD  rwAccess,
DWORD  accessSize,
DWORD  usedDataBytes,
bool  isEntireObject,
const std::string &  symbolName,
DWORD  data 
)

Sets hardware breakpoint on the given variable or symbol.

This method can set only the most basic parameters of one hardware breakpoint. If you'd like to set more than one HW breakpoint, or options not supported by this method, please set winIDEA options. To find options, set some value in HW breakpoint dialog in winIDEA, then search for it in winIDEA Help | Display Options ...

Example for PowerPC:

import isystem.connect as ic

cmgr = ic.ConnectionMgr()
cmgr.connect()

ide = ic.CIDEController(cmgr)

#configure the breakpoint
strRoot = '/iOPEN/Breakpoints.PPC55xx.BP.'
strCore = '1'
ide.setOption(strRoot + 'HW.Enabled'              , 'true')
ide.setOption(strRoot + 'HW.e200[' + strCore + '].Enabled'      , 'true')
ide.setOption(strRoot + 'HW.e200[' + strCore + '].DAC_Enable[0]', 'true')
ide.setOption(strRoot + 'HW.e200[' + strCore + '].DAC_Access[0]', 'WR')
ide.setOption(strRoot + 'e200[' + strCore + '].DAC_Address[0]'  , 'VariableName')

#apply it to the MCU
print (ide.serviceCall('/iOPEN/Core.Debug.ApplyInternalBPs', ''))
Parameters
rwAccessdefines read/write access. Should be one of IConnectDebug::EBreakpointFlags which start with bHW_acc...:
accessSizedefines the size of access area. Should be one of IConnectDebug::EBreakpointFlags which start with bHW_Size...:
usedDataBytesdetermines which byte of data is used for data value comparison (00 = no data, FF = all). It can be set as ORed value of IConnectDebug::EBreakpointFlags which start with bHW_Data...:
isEntireObjectif true, all addresses occupied by object will be monitored, otherwise only the first address is monitored. For example, if symbol is array or struct, any address occupied by the symbol may trigger a breakpoint.
symbolNamename of symbol in target program, for example variable name.
datavalue used for comparison (access breakpoints only)
Returns
0 if there was no breakpoint before this call, 1 if the breakpoint at this location was already set

Python example: test_set_hwbp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... True, # monitor all addresses of the symbol ... "main_loop_counter", ... 42) # compare value 0

◆ setHWBP() [2/2]

int isys::CBreakpointController::setHWBP ( DWORD  rwAccess,
DWORD  accessSize,
DWORD  usedDataBytes,
int  memArea,
ADDRESS_64  address,
DWORD  data 
)

Sets hardware breakpoint on the given address.

See setHWBP(DWORD, DWORD, DWORD, bool, const std::string &, DWORD) for limitations of this method and how to overcome them.

Parameters
rwAccessdefines read/write access. Should be one of IConnectDebug::EBreakpointFlags which start with bHW_acc...:
accessSizedefines the size of access area. Should be one of IConnectDebug::EBreakpointFlags which start with bHW_Size...:
usedDataBytesdetermines which byte of data is used for data value comparison (00 = no data, FF = all). It can be set as ORed value of IConnectDebug::EBreakpointFlags which start with bHW_Data...:
memAreamemory area of address
addressaddress to be monitored
datavalue used for comparison (access breakpoints only)
Returns
0 if there was no breakpoint before this call, 1 if the breakpoint at this location was already set

Python example: test_set_hwbp.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... 0, # main memory space ... 0x20000034, ... 56) # compare value 0

◆ setHWEnabled() [1/2]

int isys::CBreakpointController::setHWEnabled ( bool  isEnabled,
const std::string &  symbolName 
)

Enables / disables hardware breakpoint at the given symbol name.

Parameters
isEnabledset to true to enable the breakpoint, false to disable it
symbolNamename of symbol in target program, for example function name.
Returns
0 if breakpoint is enabled after the call, regardless of previous state.

Python example: test_set_hw_enabled.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr) bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... True, # monitor all addresses of the symbol ... "main_loop_counter", ... 42) # compare value 0

bp_ctrl.setHWEnabled(False, "main_loop_counter")

1

bp_ctrl.setHWEnabled(True, "main_loop_counter")

0

◆ setHWEnabled() [2/2]

int isys::CBreakpointController::setHWEnabled ( bool  isEnabled,
int  memArea,
ADDRESS_64  address 
)

Enables / disables hardware breakpoint at the given address.

Parameters
isEnabledset to true to enable the breakpoint, false to disable it
memAreamemory area of the breakpoint
addressaddress of the breakpoint
Returns
0 if breakpoint is enabled after the call, regardless of previous state.

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... 0, # main memory space ... 0x20000034, ... 56) # compare value 0

bp_ctrl.setHWEnabled(True, 0, 0x20000034)

0

bp_ctrl.setHWEnabled(False, 0, 0x20000034)

1

◆ setHWEnabledAll()

int isys::CBreakpointController::setHWEnabledAll ( bool  isEnabled)

Sets enabled status of all hardware breakpoints.

Parameters
isEnabledset to true to enable breakpoints, false to disable them

Python example: test_set_hw_enabled_all.py

cmgr = ic.ConnectionMgr() cmgr.connect() bp_ctrl = ic.CBreakpointController(cmgr)

bp_ctrl.setHWBP(ic.IConnectDebug.bHW_accRD,

... ic.IConnectDebug.bHW_SizeDefault, ... ic.IConnectDebug.bHW_DataLSB0, ... 0, # main memory space ... 0x20000034, ... 56) # compare value 0

bp_ctrl.setHWEnabledAll(True)

0