File: README.gdb

package info (click to toggle)
simulavr 0.1.2.2-6.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 2,756 kB
  • ctags: 3,179
  • sloc: ansic: 19,987; sh: 3,623; python: 3,528; makefile: 406; asm: 308; yacc: 145; lex: 48
file content (34 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##
## $Id: README.gdb,v 1.5 2003/09/19 19:59:20 troth Exp $
##

This README file discusses the issues involved with using the simulator
remotely from gdb.

First off, you will need to compile gdb >= 5.2.1 with the avr target support.

Once you've built and installed gdb for avr, you need to know how to use it to
debug a remote program. It's an easy, two step process.  First, you need to
start up simulavr in gdbserver mode as such:

    $ simulavr --gdbserver [other options]

Second, just start up avr-gdb with an avr elf program, connect to the remote
target, and load the program into the sim with these commands:

    $ avr-gdb myprog.elf
    (gdb) target remote localhost:<port>
    (gdb) load

where <port> is the port number that simulavr is listening on. You need to
have the simulavr running before giving gdb the target command. In most cases,
you'll be running simulavr on the same host as gdb, thus the "localhost"
part. You must use the same port number for simulavr and in the gdb target
command. If you feel the need to run simulavr on another host, just change
localhost to the name of the host that simulavr will be running on.

After gdb has connected to the remote target, you should be able to use gdb
just as if you were debugging a program natively.

For more detailed information, see the documentation in the doc subdirectory.