__setCodeBreak
Syntax
__setCodeBreak(location, count, condition, cond_type, action)Parameters
locationA string that defines the code location of the breakpoint, either a valid C-SPY expression whose value evaluates to a valid address, an absolute location, or a source location. For more information about the location types, see Enter Location dialog box.
countAn integer that specifies the number of times that a breakpoint condition must be fulfilled before a break occurs the next time.
conditionThe breakpoint condition. This must be a valid C-SPY expression, for instance a C-SPY macro function.
cond_typeThe condition type; either
"CHANGED"or"TRUE"(string).actionAn expression, typically a call to a macro, which is evaluated when the breakpoint is detected.
Return value
Result | Value |
|---|---|
Successful | An unsigned integer uniquely identifying the breakpoint. This value must be used to clear the breakpoint. |
Unsuccessful |
|
For use with
All C-SPY drivers.
Description
Sets a code breakpoint, that is, a breakpoint which is triggered just before the processor fetches an instruction at the specified location.
Example
__setCodeBreak("{D:\\src\\prog.c}.12.9", 3, "d>16", "TRUE", "ActionCode()");This example sets a code breakpoint on the label main in your source:
__setCodeBreak("main", 0, "1", "TRUE", "");This example sets the breakpoint within a specific source file and line without using the absolute file path to the source:
__setCodeBreak("{main.c}.288.7", 0, "1", "TRUE", "");