GDB can use the MIPS remote debugging protocol to talk to a MIPS board attached to a serial line. This is available when you configure GDB with `--target=mips-idt-ecoff'.
Use these GDB commands to specify the connection to your target board:
target mips port
gdbwith the name of your program as the argument. To connect to the board, use the command `target mips port', where port is the name of the serial port connected to the board. If the program has not already been downloaded to the board, you may use the
loadcommand to download it. You can then use all the usual GDB commands. For example, this sequence connects to the target board through a serial port, and loads and runs a program called prog through the debugger:
host$ gdb prog GDB is free software and ... (gdb) target mips /dev/ttyb (gdb) load prog (gdb) run
target mips hostname:portnumber
GDB also supports these special commands for MIPS targets:
set processor args
set processorcommand to set the type of MIPS processor when you want to access processor-type-specific registers. For example,
set processor r3041tells GDB to use the CPO registers appropriate for the 3041 chip. Use the
show processorcommand to see what MIPS processor GDB is using. Use the
info regcommand to see what registers GDB is using.
set mipsfpu double
set mipsfpu single
set mipsfpu none
mipsfpuvariable with `show mipsfpu'.
set remotedebug n
remotedebugvariable. If you set it to
1using `set remotedebug 1', every packet is displayed. If you set it to
2, every character is displayed. You can check the current value at any time with the command `show remotedebug'.
set timeout seconds
set retransmit-timeout seconds
set timeout secondscommand. The default is 5 seconds. Similarly, you can control the timeout used while waiting for an acknowledgement of a packet with the
set retransmit-timeout secondscommand. The default is 3 seconds. You can inspect both values with
show retransmit-timeout. (These commands are only available when GDB is configured for `--target=mips-idt-ecoff'.) The timeout set by
set timeoutdoes not apply when GDB is waiting for your program to stop. In that case, GDB waits forever because it has no way of knowing how long the program is going to run before stopping.
Go to the first, previous, next, last section, table of contents.