User`s guide
120 CPU32 Emulation
Chapter 7: Using the Emulator with a Debugger
Using the Green Hills debugger
To perform common debugger tasks
• To display registers, click the
regs
button in the Display window.
• To set a breakpoint, click on the source code line where the breakpoint is
to be located.
• To clear a breakpoint, click again on the source line.
• To step through code, click
next
.
• To run from the current PC, click
go
.
• To toggle the display between source code and source code interlaced with
assembly code, click
assem
.
• To load program symbols, reset the PC, reset the stack pointer, and run
from the start, click
restart
.
To send commands to the emulator
MULTI communicates to the emulator using the emulator’s "terminal
interface" commands. MULTI automatically generates and sends the
commands required for normal operation. If you want to communicate
directly with the emulator during a debug session, you may do so using
"terminal interface" commands through the Target window (which
comes up when hpserv is brought up). You can also enter these
commands from the Debugger window’s command pane by preceding
the command with the "target" command.
To view commands sent by MULTI to the
emulator
The communication between MULTI and the emulator can be viewed
by running hpserv in a logging mode:
remote hpserv -dc -a -o
<filename> <emulator>
The options
-dc
and
-da
log both asynchronous and console messages
and the
-o
<filename>
directs these messages to a log file called
<filename>
. When using this option, disconnect from hpserv (to flush
out the file) and then you may view
<filename>
to see what
commands MULTI sent to the emulator.