Next: OpenRISC 1000, Previous: MicroBlaze, Up: Embedded Processors
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-elf'.
Use these gdb commands to specify the connection to your target board:
target mips
portgdb
with 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 load
command 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:
portnumbertarget pmon
porttarget ddb
porttarget lsi
porttarget r3900
devtarget array
devgdb also supports these special commands for MIPS targets:
set mipsfpu double
set mipsfpu single
set mipsfpu none
set mipsfpu auto
show mipsfpu
In previous versions the only choices were double precision or no floating point, so `set mipsfpu on' will select double precision and `set mipsfpu off' will select no floating point.
As usual, you can inquire about the mipsfpu
variable with
`show mipsfpu'.
set timeout
secondsset retransmit-timeout
secondsshow timeout
show retransmit-timeout
set timeout
seconds command. The
default is 5 seconds. Similarly, you can control the timeout used while
waiting for an acknowledgment of a packet with the set
retransmit-timeout
seconds command. The default is 3 seconds.
You can inspect both values with show timeout
and show
retransmit-timeout
. (These commands are only available when
gdb is configured for `--target=mips-elf'.)
The timeout set by set timeout
does 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.
set syn-garbage-limit
numshow syn-garbage-limit
set monitor-prompt
promptshow monitor-prompt
set monitor-warnings
lsi
target. When on, gdb will
display warning messages whose codes are returned by the lsi
PMON monitor for breakpoint commands.
show monitor-warnings
pmon
command