__setLogBreak
Syntax
__setLogBreak(location, message, msg_type, condition,cond_type)
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.
messageThe message text.
msg_typeThe message type; choose between:
TEXT, the message is written word for word.ARGS, the message is interpreted as a comma-separated list of C-SPY expressions or strings.
conditionThe breakpoint condition (string).
cond_typeThe condition type; either
"CHANGED"or"TRUE"(string).
Return value
Result | Value |
|---|---|
Successful | An unsigned integer uniquely identifying the breakpoint. The same value must be used when you want to clear the breakpoint. |
Unsuccessful |
|
For use with
All C-SPY drivers.
Description
Sets a log breakpoint, that is, a breakpoint which is triggered when an instruction is fetched from the specified location. If you have set the breakpoint on a specific machine instruction, the breakpoint will be triggered and the execution will temporarily halt and print the specified message in the C-SPY Debug Log window.
Example
__var logBp1;
__var logBp2;
logOn()
{
logBp1 = __setLogBreak ("{C:\\temp\\Utilities.c}.23.1",
"\"Entering trace zone at
:\", #PC:%X", "ARGS", "1", "TRUE");
logBp2 = __setLogBreak ("{C:\\temp\\Utilities.c}.30.1",
"Leaving trace zone...", "TEXT", "1", "TRUE");
}
logOff()
{
__clearBreak(logBp1);
__clearBreak(logBp2);
}