The Simulator as a MULTI Debugger Target

The simulator can be used in conjunction with MULTI to interactively debug programs that may be difficult to debug. Invoking the simulator either from the command line or as a result of the MULTI remote command, will bring up two other windows, one labeled TARGET and the other labeled IN/OUT.

The IN/OUT window is where all output to stdout goes, and all input from stdin comes from. This separates communication with the remote process from communication with the simulator itself.

The TARGET window provides an interface to the simulator. Target commands provide a comprehensive view of the internal state of the simulated processor. Some of these commands are only useful in the simulator's ROM mode. The commands currently available in the MCore simulator are listed in the table found below.
Command Meaning
help
Show all of commands with their brief descriptions.
reset
Reset processor manually.
softreset
Send soft reset signal to processor.
intr num
Send interrupt num to processor.
fintr num
Send fast interrupt num to processor.
show timing
Show number of cycles executed.
zerotime
Reset cycle time counter.
timer count int
Send interrupt int every count cycles.
alloc addr size
Allocate size bytes of memory starting at address addr in memory.

All of these commands can also be reached from the MULTI Debugger command pane by using the target command.

OS Simulation Mode

The simulator is able to deal with number of system calls. The following table lists these system calls.
exit
close
stat
link
read
access
fstat
unlink
write
creat
brk
getpid
open
lseek
time
alarm

A large portion of library functions use a combination of these calls to achieve their goal. These system calls are unavailable to you in ROM simulation mode.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.