winIDEA SDK
|
This class contains advanced methods, which are needed for complex projects, for example Eclipse debugger plug-in.
IMPORTANT: Resources allocated by calls to some methods of this class must be explicitly released. This is true also for managed languages like Java and C#. Improper allocation/releasing of resources may crash application!
#include <CDataController2.h>
Public Types | |
enum | ESymbolsType { estFunctions , estGlobalVariables , estModules } |
Types of symbols to be returned by the method getSymbols(). More... | |
Public Member Functions | |
bool | batchAccess (DWORD dwBatchAccessFlags, const struct SBatchAccessHeader *pBatchAccessHeader, const std::vector< SBatchAccessItem > &batchAccessItems, std::vector< SBatchAccessItemResult > &batchAccessItemResults) |
Performs multiple memory accesses, using deterministic delays. More... | |
CDataController2 (std::shared_ptr< ConnectionMgr > connectionMgr) | |
Instantiates object associated with the given connection. | |
void | configureStackUsage (ADDRESS_64 start, ADDRESS_64 end, unsigned char value=0xcc) |
void | configureStackUsage (const std::string &start, const std::string &end, unsigned char value) |
isys::CCodeStoreSPtr | csCreate () |
This method creates an empty code store object. More... | |
isys::CCodeStoreSPtr | csDif (const isys::CCodeStoreSPtr &rsp1, const isys::CCodeStoreSPtr &rsp2, bool flDifferent=true, bool flNotIn1=true, bool flNotIn2=true, bool flEqual=false) |
This method returns differences between two SPCodeStore instances. More... | |
isys::CCodeStoreSPtr | csGetDownloaded (BYTE memArea, const std::string &fileDownload, bool data) |
This method retrieves all downloaded code. More... | |
isys::CCodeStoreSPtr | csReadMemory (BYTE memArea, const isys::CCodeStoreSPtr &rspSource) |
This method reads memory to the given rspSource object. More... | |
isys::CCodeStoreSPtr | csVerifyDownloaded (BYTE memArea, const std::string &fileDownload, const std::string &fileReport, IConnectDebug2::ECodeCacheOp verifyAgainst=IConnectDebug2::ccSrcLoaded) |
This method verifies downloaded data with the given file. More... | |
void | eraseFlash (int nDevice=-1) |
CValueType | evaluate (IConnectDebug::EAccessFlags accessFlags, const std::string &expression) |
Calls evaluate(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &expression) with evaluateFlags = IConnectDebug::efDefaultMemAreaDisplay . More... | |
CValueType | evaluate (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression) |
Evaluates an expression. More... | |
isys::CDataCompositeSPtr | evaluateComposite (IConnectDebug::EAccessFlags accessFlags, const std::string &expression, bool isGetValue, int maxArrayElements) |
Evaluates expression which may refer to composed data, for example arrays and structures. More... | |
iEclipse::IConfiguration * | getConfiguration (DWORD flags) |
Returns program configuration, for example partitions. More... | |
CCPUInfo | getCPUInfo () |
Returns CPU info. More... | |
iEclipse::ICPUSFR * | getCPUSFRs (DWORD flags) |
Provides information about CPU's SFRs. More... | |
EEndian | getDefaultEndian () |
Returns default CPU endian mode. More... | |
iEclipse::IDisassemblyBlock * | getDisassembly (DWORD flags, BYTE memArea, ADDRESS_64 startAddress, ADDRESS_64 numMAUs) |
This method provides disassembly of the given source code block. More... | |
iEclipse::IDisassemblyBlock * | getDisassembly (DWORD flags, const std::string &fileName, int lineNumber, int numLines) |
This method provides disassembly of the given source code block. More... | |
iEclipse::IExpressionType * | getExpressionType (DWORD flags, const std::string &expression) |
Provides information about expression. More... | |
void | getFunctions (int partition, FunctionVector &functions) |
Returns list of functions in a download file. More... | |
iEclipse::IGlobals * | getGlobals (DWORD flags, DWORD partition) |
Provides information about global items in a program. More... | |
void | getLabels (int partition, VariableVector &labels) |
Returns list of labels in a download file. More... | |
void | getMacros (int partition, iconnect::StrVector &names, iconnect::StrVector &values) |
Returns a list of macros in the given partition. More... | |
int | getMemoryAreaBytesPerMAU (int memArea) |
Returns the number of bytes per addressable memory unit. More... | |
void | getModules (int partition, ModuleVector &modules) |
Returns list of source code files which were used to generate a download file. More... | |
void | getPartitions (iconnect::StrVector &paths, iconnect::StrVector &fileNames) |
Returns a list of download files. More... | |
CRegisterInfo | getRegisterInfo (int registerIdx) |
Provides info about a register. More... | |
iEclipse::IStackFrameInfo * | getStackFrameInfo (bool isActiveFrameOnly, bool isAbsolutePath) |
Provides the current stack frames. More... | |
void | getStackFrames (bool isActiveFrameOnly, bool isAbsPaths, isys::StackFrameVector &stackFrames) |
Gets list of current stack frames on a target. More... | |
CStackUsage | getStackUsage () |
Returns information about maximum stack usage since seedStack() was called. More... | |
void | getSymbols (ESymbolsType symbolsType, iconnect::StrVector &symbolNames, int partition=PARTITION_DEFAULT) |
Gets list of all symbols of the specified type. More... | |
CSystemMemoryAreas | getSystemMemoryAreas () |
This method returns information about memory areas available on a target. More... | |
iEclipse::SInfo | getTargetInfo () |
Obtains general info about the target, not provided with other methods. More... | |
void | getTypedefs (int partition, TypedefVector &typedefs) |
void | getTypes (int partition, TypeVector &types) |
Returns list of types in a download file. More... | |
void | getVariables (int partition, VariableVector &variables) |
Returns list of global variables in a download file. More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, const std::string &expression, const CValueType &value, bool readBack=true) |
See modify(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &, const CValueType &, bool). More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, const std::string &expression, const std::string &value, bool readBack=true) |
See modify(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &, const CValueType &, bool). More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression, const CValueType &value, bool readBack=true) |
Modifies expression to value. More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression, const std::string &value, bool readBack=true) |
Modifies expression to string value. More... | |
std::vector< BYTE > | readMemory (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU) |
This method reads memory block and returns data and access info. More... | |
CValueType | readRegister (IConnectDebug::EAccessFlags accessFlags, const std::string ®isterName) |
Reads the specified general purpose register. More... | |
CValueType | readSFR (DWORD dwHandle, const SType &type) |
Reads SFR. More... | |
CValueType | readValue (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, const SType &type) |
Reads a value from the target system. More... | |
void | release (iEclipse::IConfiguration *ptr) |
Releases instance of iEclipse::IConfiguration. More... | |
void | release (iEclipse::ICPUSFR *ptr) |
Releases instance of iEclipse::ICPUSFR. More... | |
void | release (iEclipse::IDisassemblyBlock *ptr) |
Releases instance of iEclipse::IDisassemblyBlock. More... | |
void | release (iEclipse::IExpressionType *ptr) |
Releases instance of iEclipse::IExpressionType. More... | |
void | release (iEclipse::IGlobals *ptr) |
Releases instance of iEclipse::IGlobals. More... | |
void | release (iEclipse::IStackFrameInfo *ptr) |
Releases instance of iEclipse::IStackFrameInfo. More... | |
void | secureFlash (int nDevice=-1) |
Secures FLASH memory. More... | |
void | seedStack () |
Writes the given values to stack memory area. More... | |
void | setStackFrameContext (DWORD flags, DWORD context) |
Sets active stack frame. More... | |
void | unsecureFlash (int nDevice=-1) |
Unsecures FLASH memory. More... | |
std::vector< BYTE > | writeMemory (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU, std::vector< BYTE > &buff) |
Writes block of data to target memory, and returns access information. More... | |
void | writeMemoryNAI (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU, std::vector< BYTE > &buff) |
Writes block of data to target memory. More... | |
void | writeRegister (IConnectDebug::EAccessFlags accessFlags, const std::string ®isterName, const CValueType ®isterInfo) |
Writes value to the specified core register. More... | |
CValueType | writeSFR (DWORD flags, DWORD dwHandle, const CValueType &value) |
Writes value to SFR, then optionally reads it, to get the actual value. More... | |
void | writeValue (IConnectDebug::EAccessFlags accessFlags, bool isNotRefreshWinIDEAGUIAfterWrite, BYTE memArea, ADDRESS_64 aAddress, const CValueType &value) |
Writes a value to the target system. More... | |
void | writeValue (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, const CValueType &value) |
Writes a value to the target system. More... | |
Static Public Member Functions | |
static std::vector< BYTE > | byteArrayToVector (BYTE *array, size_t len) |
This method converts byte array to std::vector<BYTE>, which is supported by SWIG and provides better access than pure C arrays. | |
static BYTE | getByte (BYTE *array, int idx) |
Gets array element at index idx . More... | |
static void | setByte (BYTE *array, int idx, BYTE value) |
Sets array element at index idx to value . More... | |
static void | vectorToByteArray (std::vector< BYTE > &buff, BYTE *array, size_t size) |
This method converts std::vector<BYTE> to byte array. | |
Static Public Attributes | |
static const int | PARTITION_CURRENT = -2 |
The current download file is used. | |
static const int | PARTITION_DEFAULT = -1 |
The default download file is sued. | |
|
inherited |
Types of symbols to be returned by the method getSymbols().
Enumerator | |
---|---|
estFunctions | get functions |
estGlobalVariables | get global variables |
estModules | get modules |
|
inherited |
Performs multiple memory accesses, using deterministic delays.
dwBatchAccessFlags | see enum EFlags in SBatchAccessHeader, flags that start with prefix 'fl' |
pBatchAccessHeader | see SBatchAccessHeader |
batchAccessItems | items defining the type and time of an individual access. |
batchAccessItemResults | objects that will receive the results of every individual access. |
IOException | if one of the accesses failed |
FeatureNotImplementedException | if batch access is not implemented for your target |
Example:
const int NUM_ITEMS = 1; // just one item to execute in every run const int NUM_RUNS = 100; // perform so many iterations SBatchAccessHeader BAH = {0}; SBatchAccessItem aBAI[NUM_ITEMS]; memset(aBAI, 0, sizeof aBAI); // define header BAH.m_dwFlags = SBatchAccessHeader::flRealTime; // use real-time access BAH.m_dwFlags |= SBatchAccessHeader::flWantTimeStamp; BAH.m_dwNumItems = NUM_ITEMS; BAH.m_dwNumRuns = NUM_RUNS; BAH.m_qwRunInterval = 500; // every 500 us // Define item(s),iCounter
in this case. Call CAddressController::getSymbolInfo() // to getaSizeMAUs
,byMemArea
, andaAddress
ofiCounter
. aBAI[0].m_byFlags = SBatchAccessItem::flRead; // it's a read aBAI[0].m_bySize = (BYTE)aSizeMAUs; // size or iCounter aBAI[0].m_byMemArea = byMemArea; // memory area of iCounter aBAI[0].m_aAddress = aAddress; // address of iCounter SBatchAccessItemResult aBAIR[NUM_ITEMS * NUM_RUNS]; // make space for results bool hr = batchAccess(0, &BAH, aBAI, aBAIR);
Python example: test_batch_access.py
|
inherited |
|
inherited |
Configures winIDEA options used for measuring stack usage. This method changes values of options Debug.StackUsage.*
in winIDEA. This method must be called before download, for settings to take effect. After download you should call seedStack() without parameters to seed the stack memory region.
start | starting address. If both start and end are empty strings, then stack usage monitoring is disabled. |
end | end address - value at this address is not modified, so that size = end - start . If both start and end are empty strings, then stack usage monitoring is disabled. |
value | value to write to the stack. Not that this value should not interfere with other values written to stack to get reliable stack usage with getStackUsage(). |
Python example: test_configure_stack_usage.py
|
inherited |
This method creates an empty code store object.
Python example: test_cs_read_memory.py
|
inherited |
This method returns differences between two SPCodeStore instances.
rsp1 | the first CCodeStore object |
rsp2 | the second CCodeStore object |
flDifferent | report locations present in both objects, but with different contents |
flNotIn1 | report locations that are not in rsp1, but present int rsp2 |
flNotIn2 | report locations that are not in rsp2, but present int rsp1 |
flEqual | report locations with equal contents |
Python example: test_code_store_diff.py
|
inherited |
This method retrieves all downloaded code.
memArea | specifies the memory space for which the downloaded code should be retrieved |
fileDownload | if empty, all downloaded code is retrieved, otherwise only for the specified file |
data | true to retrieve the data. Otherwise only address information is retrieved. |
Python example: test_code_store.py
|
inherited |
This method reads memory to the given rspSource
object.
memArea | specifies the memory space from which to read |
rspSource | a CCodeStore object filled with items (address and size), which should be read |
Python example: test_cs_read_memory.py
|
inherited |
This method verifies downloaded data with the given file.
memArea | specifies the memory space for which the verify should be performed |
fileDownload | if empty, all downloaded code is verified, otherwise only for the specified file |
fileReport | file path to which the report should be written. If empty no report is generated |
verifyAgainst | can be one of IConnectDebug2::ccSrcLoaded, IConnectDebug2::ccSrcInFiles, or IConnectDebug2::ccSrcFiltered. |
Python example: test_cs_verify_downloaded.py
|
inherited |
Erases FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
|
inherited |
Calls evaluate(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &expression) with evaluateFlags = IConnectDebug::efDefaultMemAreaDisplay
.
Python example with online value graph: chart_sample.py
Python module for plotting of watch expressions: variables_chart.py
Python example with web server providing results of this method: webserver.py
Python example: test_data_evaluate.py
|
inherited |
Evaluates an expression.
Works only for simple types. See also Qualified Variable Names.
accessFlags | IConnectDebug::EAccessFlags determine what kind of memory access is permitted if required to resolve the expression |
evaluateFlags | define result format |
expression | any C syntax expression. CPU registers (including SFRs) can be used in expression with prefix '@', for example '@R0'. |
IOException | if complex type is given or in case of an error |
isys::CDataCompositeSPtr isys::CDataController2::evaluateComposite | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | expression, | ||
bool | isGetValue, | ||
int | maxArrayElements | ||
) |
Evaluates expression which may refer to composed data, for example arrays and structures.
Let's have:
MyStruct a[10]
Returned object will contain information about array (type of elements and size), and 10 elements, each of them containing also elements of MyStruct
.
accessFlags | see IConnectDebug::EAccessFlags, usually we specify IConnectDebug::fMonitor or IConnectDebug::fRealTime. |
expression | C expression or name of variable to be evaluated. |
isGetValue | if true, values of all elements are evaluated - call CDataComposite::getValue() to get the value. If false, only structure of composite is returned - types and children of elements. Call to CDataElement::getValue() will throw an exception in this case. |
maxArrayElements | max number of array elements to show. Since arrays may be very large, setting of this parameter can enable getting of structures with large arrays. |
Python example: test_evaluate_composite.py
|
staticinherited |
Gets array element at index idx
.
This is general method, which can be used to read arrays, which are returned by isystem.connect
function parameters or are elements of isystem.connect
structures, for example SBatchAccessItem
.
Python example: test_batch_access.py
iEclipse::IConfiguration * isys::CDataController2::getConfiguration | ( | DWORD | flags | ) |
Returns program configuration, for example partitions.
The returned resource must be released with call to method release() after usage.
flags | reserved, should be 0. |
Python example: test_get_configuration.py
|
inherited |
Returns CPU info.
See definition of this struct in CCPUInfo.h for enum constants which describe CPU type.
Python example: test_cpu_info.py
iEclipse::ICPUSFR * isys::CDataController2::getCPUSFRs | ( | DWORD | flags | ) |
Provides information about CPU's SFRs.
The returned resource must be released with call to method release() after usage.
flags | one of values defined in iEclipse::IConnectEclipse::EGetCPUSFR. |
Python example: test_get_cpusfrs.py
|
inherited |
Returns default CPU endian mode.
Python example: test_get_default_endian.py
iEclipse::IDisassemblyBlock * isys::CDataController2::getDisassembly | ( | DWORD | flags, |
BYTE | memArea, | ||
ADDRESS_64 | startAddress, | ||
ADDRESS_64 | numMAUs | ||
) |
This method provides disassembly of the given source code block.
The returned resource must be released with call to method release() after usage.
flags | see iEclipse::IConnectEclipse::EDisassemblyFlags for possible values |
memArea | memory area of the code block |
startAddress | starting address of the code block |
numMAUs | number of memory allocation units to get disassembly for |
iEclipse::IDisassemblyBlock * isys::CDataController2::getDisassembly | ( | DWORD | flags, |
const std::string & | fileName, | ||
int | lineNumber, | ||
int | numLines | ||
) |
This method provides disassembly of the given source code block.
The returned resource must be released with call to method release() after usage.
flags | see iEclipse::IConnectEclipse::EDisassemblyFlags for possible values |
fileName | name of the source code file |
lineNumber | starting line number of the code block |
numLines | number of source code lines to get disassembly for |
Python example: test_get_disassembly.py
iEclipse::IExpressionType * isys::CDataController2::getExpressionType | ( | DWORD | flags, |
const std::string & | expression | ||
) |
Provides information about expression.
This method can be used to get information about complex variables, for example members of a structure, elements of array, ... The returned resource must be released with call to method release() after usage.
flags | reserved, should be 0 |
expression | C expression, for example myStruct.counter , or p->a[0] |
Python example: test_get_expression_type.py
|
inherited |
Returns list of functions in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
functions | vector to receive result |
Python example: test_get_functions.py
iEclipse::IGlobals * isys::CDataController2::getGlobals | ( | DWORD | flags, |
DWORD | partition | ||
) |
Provides information about global items in a program.
The returned object contains only information requested by flags
. The returned resource must be released with call to method release() after usage.
flags | see iEclipse::IConnectEclipse::EGetGlobalsFlags for possible values |
partition | partition index |
Python example: test_get_globals.py
|
inherited |
Returns list of labels in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
labels | vector to receive result |
Python example: test_get_labels.py
|
inherited |
Returns a list of macros in the given partition.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
names | vector, which will contain names of macros on return. |
values | vector, which will contain values of macros on return. |
Python example: test_get_macros.py
|
inherited |
Returns the number of bytes per addressable memory unit.
memArea | memory area for which to return the number |
Python example: test_get_memory_area_bytes_per_mau.py
|
inherited |
Returns list of source code files which were used to generate a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
modules | vector to receive result |
Python example: test_get_modules.py
|
inherited |
Returns a list of download files.
paths | vector to receive paths of download files |
fileNames | vector to receive names of download files |
Python example: test_get_partitions.py
CRegisterInfo isys::CDataController2::getRegisterInfo | ( | int | registerIdx | ) |
Provides info about a register.
Only main registers can be accessed by this method. Use GetCPUSFR() and SFRValue() to access SFRs.
registerIdx | register index. Call getTargetInfo() to get the number of registers on the target. Index should be in range [0 .. SInfo.m_dwNumRegisters - 1] |
Python example: test_get_register_info.py
iEclipse::IStackFrameInfo * isys::CDataController2::getStackFrameInfo | ( | bool | isActiveFrameOnly, |
bool | isAbsolutePath | ||
) |
Provides the current stack frames.
The returned resource must be released with call to method release() after usage.
isActiveFrameOnly | if true, only the active stack frame is is retrieved. This way the method call is much faster. |
isAbsolutePath | if true, absolute paths are returned |
Python example: test_get_stack_frame_info.py
|
inherited |
Gets list of current stack frames on a target.
The stack frame information depends on compiler debug info and may not be always available.
isActiveFrameOnly | if true, only the active frame is returned. This can be much faster than retrieving all frames. |
isAbsPaths | if true, absolute paths are returned |
stackFrames | vector to receive stack frame objects |
Python example: test_get_stack_frames.py
|
inherited |
Returns information about maximum stack usage since seedStack() was called.
Python example: test_seed_get_stack_usage.py
|
inherited |
Gets list of all symbols of the specified type.
Symbols must be downloaded in winIDEA before this function is called.
symbolsType | type of symbols to retrieve |
symbolNames | after return this vector contains names of all symbols of the specified type from download file. |
partition | index of download file to get symbols from |
Python example: test_get_symbols.py
|
inherited |
This method returns information about memory areas available on a target.
Python example: test_get_system_memory_areas.py
iEclipse::SInfo isys::CDataController2::getTargetInfo | ( | ) |
Obtains general info about the target, not provided with other methods.
Python example: test_get_target_info.py
|
inherited |
getTypes()
instead.Returns list of typedefs in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
typedefs | vector to receive result |
Python example: test_get_typedefs.py
|
inherited |
Returns list of types in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
types | vector to receive result |
Python example: test_get_types.py
|
inherited |
Returns list of global variables in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
variables | vector to receive result |
Python example: test_get_variables.py
|
inherited |
|
inherited |
|
inherited |
Modifies expression to value.
The expression must evaluate to a lvalue. See also Qualified Variable Names.
accessFlags | determines what kind of memory access is permitted if required to resolve the expression, |
evaluateFlags | define result format. |
expression | any C syntax expression that evaluates to a lvalue |
value | contains the value to write to expression |
readBack | set to false to skip reading back the value |
IOException | in case of an error |
Python example: test_data_modify.py
|
inherited |
Modifies expression to string value.
The expression must evaluate to a lvalue. See also Qualified Variable Names.
accessFlags | determines what kind of memory access is permitted if required to resolve the expression, |
evaluateFlags | define result format. |
expression | any C syntax expression that evaluates to a lvalue |
value | contains the value to write to expression |
readBack | set to false to skip reading back the value |
IOException | in case of an error |
Python example: test_data_modify.py
|
inherited |
This method reads memory block and returns data and access info.
Returned vector contains data in the first (aNumMAUs * bytesPerMAU)
bytes, and access info in aNumMAUs
bytes at offset (aNumMAUs * bytesPerMAU)
.
Access info bytes tell us, whether read for MAU succeeded or not. Each byte is set to ACCESS_OK
or ACCESS_FAIL
. These two constants are defined in globdefs.h.
Contents of the returned vector:
[(target memory data, size = aNumMAUs * bytesPerMAU) (access info, size = aNumMAUs)]
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to read. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
|
IOException | in case of an error |
Python example: test_read_write_memory.py
|
inherited |
Reads the specified general purpose register.
For SFRs please use method evaluate().
accessFlags | see IConnectDebug::EAccessFlags for available flags, except fCacheCode |
registerName | name of the register to read |
IOException | in case of an error |
Python example: test_read_write_register.py
CValueType isys::CDataController2::readSFR | ( | DWORD | dwHandle, |
const SType & | type | ||
) |
Reads SFR.
IMPORTANT: Always check for error on return value: retVal.isError() to avoid misinterpretation of results!
dwHandle | handle of the SFR |
type | defines SFR type. Required to return valid CValueType object on output. |
Python example: test_read_write_sfr.py
|
inherited |
Reads a value from the target system.
This function resembles readMemory() but additionally it formats the value according to the type specified (including endian conversions).
Example:
debug = ic.CDebugFacade(cmgr) varType = ic.SType() varType.m_byBitSize = 32 varType.m_byType = ic.SType.tSigned memArea = 0 addr = 1073768999 value = debug.readValue(ic.IConnectDebug.fMonitor, memArea, addr, varType) print "Result = ", value.getInt()
accessFlags | use IConnectDebug::EAccessFlags, except fCore, and fSFR |
memArea | memory area, definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access. |
type | variable containing the type info of value to be read |
IOException | in case of an error |
Python example: test_read_write_value.py
void isys::CDataController2::release | ( | iEclipse::IConfiguration * | ptr | ) |
Releases instance of iEclipse::IConfiguration.
Python example: test_get_configuration.py
void isys::CDataController2::release | ( | iEclipse::ICPUSFR * | ptr | ) |
Releases instance of iEclipse::ICPUSFR.
Python example: test_get_cpusfrs.py
void isys::CDataController2::release | ( | iEclipse::IDisassemblyBlock * | ptr | ) |
Releases instance of iEclipse::IDisassemblyBlock.
Python example: test_get_disassembly.py
void isys::CDataController2::release | ( | iEclipse::IExpressionType * | ptr | ) |
Releases instance of iEclipse::IExpressionType.
Python example: test_get_expression_type.py
void isys::CDataController2::release | ( | iEclipse::IGlobals * | ptr | ) |
Releases instance of iEclipse::IGlobals.
Python example: test_get_globals.py
void isys::CDataController2::release | ( | iEclipse::IStackFrameInfo * | ptr | ) |
Releases instance of iEclipse::IStackFrameInfo.
Python example: test_get_stack_frame_info.py
|
inherited |
Secures FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
Python example: service_functions.py
|
inherited |
Writes the given values to stack memory area.
Memory locations and value are defined with options Debug.StackUsage.*
in winIDEA, which can be configured with Debug | Configure Session... | Applications
dialog or method configureStackUsage() in this class.
Python example: test_seed_get_stack_usage.py
|
staticinherited |
Sets array element at index idx
to value
.
This is general method, which can be used to set arrays, which are required as isystem.connect
function parameters or are elements of isystem.connect
structures, for example SBatchAccessItem
.
Python example: test_batch_access.py
void isys::CDataController2::setStackFrameContext | ( | DWORD | flags, |
DWORD | context | ||
) |
Sets active stack frame.
Variables of the selected stack frame are available for evaluator (see methods CDataController::evaluate() and CDataController::modify()).
flags | reserved, should be 0 |
context | index of the stack frame to be selected |
Python example: test_set_stack_frame_context.py
|
inherited |
Unsecures FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
Python example: service_functions.py
|
inherited |
Writes block of data to target memory, and returns access information.
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to write. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
| ||||||||
buff | vector, which contains data to be written to memory on the target. Languages other than C++ should instantiate class VectorBYTE for this parameter. Examples:Python: buff = isystem.connect.VectorBYTE([0, 0, 0, 0xff])Java: VectorBYTE buff = new VectorBYTE(); buff.add((short)0); buff.add((short)0); buff.add((short)0); buff.add((short)255); |
IOException | in case of an error |
Python example: test_read_write_memory.py
|
inherited |
Writes block of data to target memory.
This method is faster than writeMemory(), because no access information is returned.
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to write. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
| ||||||||
buff | vector, which contains data to be written to memory on the target. Languages other than C++ should instantiate class VectorBYTE for this parameter. Examples:Python: buff = isystem.connect.VectorBYTE([0, 0, 0, 0xff])Java: VectorBYTE buff = new VectorBYTE(); buff.add((short)0); buff.add((short)0); buff.add((short)0); buff.add((short)255); |
IOException | in case of an error |
Python example: see test_read_write_memory.py
|
inherited |
Writes value to the specified core register.
Example:
# bit size is 32, value is 1234567 r1Value = isystem.connect.CValueType(32, 1234567) debug.writeRegister(IConnectDebug.fMonitor, 'R1', r1Value)
Longer way, if we use specific data types:
# first we should define value type valueType = isystem.connect.SType() valueType.m_byType = isystem.connect.SType.tSigned valueType.m_byBitSize = 32 # create 'Value' with type and value r0Value = isystem.connect.CValueType(valueType, 5678) debug.writeRegister(0, "R0", r0Value)
accessFlags | see IConnectDebug::EAccessFlags for available flags, except fCacheCode |
registerName | name of the register to write to |
registerInfo | a value to be written to the register |
IOException | in case of an error |
Note: This method can modify only core registers. To modify SFRs please use the modify() method.
Python example : test_read_write_register.py
CValueType isys::CDataController2::writeSFR | ( | DWORD | flags, |
DWORD | dwHandle, | ||
const CValueType & | value | ||
) |
Writes value to SFR, then optionally reads it, to get the actual value.
The type part of CValueType is not used.
flags | flags of type ESFRValue. Values may be ORed together. Bit IConnectEclipse::svWrite is set by this method, so flags == 0 will perform write. |
dwHandle | handle of the SFR |
value | value to be written to SFR |
IConnectEclipse::svWriteThenRead
is set, otherwise the input value is returned. Type in return value is always the same as type of input value.Python example: test_read_write_sfr.py
|
inherited |
Writes a value to the target system.
This function resembles writeMemory() but additionally it formats the value according to the type specified (including endian conversions).
accessFlags | use IConnectDebug::EAccessFlags, except fCore, fSFR, and fCacheXXX. |
isNotRefreshWinIDEAGUIAfterWrite | if true, winIDEA windows are not refreshed after write operation - this speeds up operation. |
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access |
value | variable containing the value to write |
IOException | in case of an error |
Python example: test_read_write_value.py
|
inherited |
Writes a value to the target system.
This function resembles writeMemory() but additionally it formats the value according to the type specified (including endian conversions).
accessFlags | use IConnectDebug::EAccessFlags, except fCore, fSFR, and fCacheXXX. |
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access |
value | variable containing the value to write |
IOException | in case of an error |
Python example: test_read_write_value.py