
October 13 1995, Draft 1
343
Chapter 7 Software Debugging
trap). These table entries point to the DebugCore entry labels
dbg_V_bkpt
and
dbg_V_trace
, respectively. Note, all the DBG module functions and data structure
names begin with the
dbg_
prefix.
OS Cold–Start
The operating system is responsible for inserting the necessary address labels
into the vector table. Any vector table entries which are not required by the operating
system can be
defaulted
to the DebugCore, via the
dbg_trap
entry. When this entry is
used, register
gr64
should contain the original trap number (see section D.4.1 for al-
ternatives). It can be very useful to direct traps such as protection violation (number
5) and Data TLB protection Violation (number 13) into the DebugCore. This is much
better than just issuing a HALT instruction in the operating system. When a trap is
taken into the DebugCore a message is sent to the MonTIP process which will inform
the DFE process when execution has halted. DFEs such as MonDFE and GDB under-
stand the 29K trap number assignment and can report a trap number 13 as a User
mode data protection violation (Segmentation fault in Unix language).
Initializing the vector table is part of what is known as the operating system
cold–start code. The operating system start–up sequence is shown in Figure 7-5.
When the processor’s power is applied, or when the *RESET pin is asserted, the
CPU begins executing instructions at location 0 in ROM instruction space (ROM
space and instruction space are the same in many 29K family members). Control is
usually passed directly to the operating system cold–start code. To save the contents
of all the processor’s registers before the system is initialized, the user may modify
V_BKPT
Figure 7-4.
Vector Table Assignment for DebugCore 2.0
dbg_V_bkpt
VAB
V_TRACE
V_INTR0
V_DBG_MSG
V_OS_MSG
V_RESET
75
76
255
V_PROT
5
15
example 16
0
dbg_trap,
gr64=5
dbg_V_trace
msg_intr
virtual
interrupts, 75
and 76
dbg_V_msg
os_V_msg
71
OS/DebugCore
shared data structure
V_71