st20-gp6 STMicroelectronics, st20-gp6 Datasheet - Page 81

no-image

st20-gp6

Manufacturer Part Number
st20-gp6
Description
Gps Processor
Manufacturer
STMicroelectronics
Datasheet
ST20-GP6
14.6.2 Software solutions
If the user wishes to break on the n th occurrence of a given instruction using a counter in the DCU,
then there is no problem associated with abortable instructions because the counter is adjusted on
the completion of the instruction, not the start of the instruction. More specifically, the counter is
adjusted when the CPU commits to executing the instruction; this may be at the completion of an
abortable instruction, or it may be at an interrupt point in the middle of an interruptible instruction.
In the more complex example, the user wishes to break on the nth occurrence of a given instruction
in a given thread. In this case, a hardware break is set on the given instruction, and the breakpoint
trap handler contains just enough code to distinguish the desired thread and decrement a counter
in software. Of course, inserting the breakpoint makes the instruction appear to be abortable and
the count is not reliable. However, if a pair of break points are used, and counting only takes place
when the desired thread moves from the first to the second breakpoint, then a reliable count can be
established.
81/123

Related parts for st20-gp6