Source-Level Debug with dbx

This page describes the procedure for using MIPS' dbx with PMON/IMON. This procedure will not work with Sun's dbx. The Sun dbx is targeted to the Sparc, the MIPS dbx is targeted to the MIPS R3000.

To use PMON/IMON with MIPS' dbx, you will need two serial ports. One serial port (connected to the Monitor's tty0) will be used as the console. This port is used to issue the command 'debug'. It is also the port where program I/O will appear. The second port is used for dbx to communicate with the Monitor's tty1. It is also used to download the program prior to switching to 'debug' mode.

-- Compile and link programs with -g

% cat /etc/remote.pdbx		Display port information on host port1.
port1:dv=/dev/tty1:br#9600:

% cat ~/.dbxinit 		Display setup for dbx.
set $pdbxport = "port1"
set $usesockets=0
set $manual_load = 1

PMON> set hostport tty1		Specify protocol and port for target.
PMON> set dlproto EtxAck 
PMON> set dlecho off 
PMON> load 			Prepare for download, and start.

% edown /dev/tty1 < test1.rec
% dbxr3000 -prom test1		Invoke dbx.

(dbx) stop in main		Optionally set breakpoint at main.
(dbx) run			Prepare for execution.

PMON> debug			Begin executing.

See also the debug command.


Navigation: Document Home | Document Contents | Document Index