Debug Manual

Table Of Contents
Debug Manual421921-003
1-1
1 Introduction
The Guardian debug facility (Debug) provides a tool for interactively debugging a
running process. Using Debug, you can designate certain program code or memory
locations as breakpoints. When these breakpoints are executed or accessed in the
specified way (read, write, or change), your process enters the debug state.
While a process is in the debug state, you can interactively display and modify the
contents of the process’s variables, display and modify the contents of the process’s
registers, and set other breakpoints.
Debug is a low-level debugging facility. To use Debug, you should have a thorough
understanding of the system hardware registers and the system addressing scheme.
Refer to the server description manual appropriate for the system at your site.
These topics are covered in this section:
Execution Modes on TNS/R Systems
What User Access Is Required for Debugging on page 1-2
How to Make a Process Enter Debug on page 1-2
How to Select Debug as the Debugger on page 1-6
Why a Process Enters Debug on page 1-7
How to Determine Process State on a Trap or Signal on page 1-7
Ending a Debug Session on page 1-10
What Appears in the Debug Header Message on page 1-10
How to Use Debug on page 1-13
How Debug Breakpoints Work on page 1-14
Execution Modes on TNS/R Systems
TNS/R systems can execute TNS/R native code, TNS code, and accelerated code.
User processes run in all of these modes.
Native code is produced by a TNS/R native compiler and consists entirely of RISC
instructions that have been optimized to take full advantage of the RISC architecture.
TNS code executes on RISC processors by millicode emulation.
Accelerated code is produced by the Accelerator, a program that processes a TNS
object file to run more efficiently on a TNS/R processor. An accelerated object file
consists of RISC instructions generated by the Accelerator as well as the original TNS
instructions.