2
## $Id: README.gdb,v 1.5 2003/09/19 19:59:20 troth Exp $
5
This README file discusses the issues involved with using the simulator
8
First off, you will need to compile gdb >= 5.2.1 with the avr target support.
10
Once you've built and installed gdb for avr, you need to know how to use it to
11
debug a remote program. It's an easy, two step process. First, you need to
12
start up simulavr in gdbserver mode as such:
14
$ simulavr --gdbserver [other options]
16
Second, just start up avr-gdb with an avr elf program, connect to the remote
17
target, and load the program into the sim with these commands:
20
(gdb) target remote localhost:<port>
23
where <port> is the port number that simulavr is listening on. You need to
24
have the simulavr running before giving gdb the target command. In most cases,
25
you'll be running simulavr on the same host as gdb, thus the "localhost"
26
part. You must use the same port number for simulavr and in the gdb target
27
command. If you feel the need to run simulavr on another host, just change
28
localhost to the name of the host that simulavr will be running on.
30
After gdb has connected to the remote target, you should be able to use gdb
31
just as if you were debugging a program natively.
33
For more detailed information, see the documentation in the doc subdirectory.