To Correlate Relocatable Code Using The Address Offset - HP 16600A Series User Manual

Solutions for the motorola cpu32
Hide thumbs Also See for 16600A Series:
Table of Contents

Advertisement

processor and your code.
Example
A common example of this is setting a trigger on the source line
following a loop, for instance:
Line #
Addr
======
====== =====================
100
1000 for (i=0;i<10;i++)
1000
101
1002 {
1002
102
1002
1002
103
1008 }
1008
100A
1010
104
1012 printf("%d\n", foo);
1012
The instruction at 1012 will be prefetched following the BLT at
address 1010. So, setting a trigger on line #104 (address 1012)
will result in a premature trigger.
To correlate relocatable code using the address
offset
You need to adjust the source correlation tool set to compensate for
relocatable code segments or memory management units that produce
fixed code offsets.
The offset field in the trigger menu allows you to offset the symbol
address. Entering the appropriate address offset will cause the source
correlation tool set to reference the correct symbol information for the
relocatable or offset code.
To adjust for prefetches, use a trigger offset of 4 (prefetch queue
depth) to avoid triggering on prefetched instructions. This is not a
foolproof scheme, since this may result in a missed trigger if a branch
takes place between the base address and the offset address. For the
CPU32, an offset of 4 is large enough to overcome the prefetch queue.
Solutions for CPU32
Chapter 5: Symbols and Source Code in the Analyzer
Triggering on Symbols and Source Code
C source
==============================
forLoop1:
foo = foo + 100;
Assembly Source
MOVEQ
#0,D3
ADD.L
#100,D2
ADDQ.L
#1,D3
CMP.L
#10,D3
BLT
forLoop1
-MOVEA.L D2,A0
121

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

16700a series

Table of Contents