avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Re: Yet another Avr-gcc_Simulavr_Avr-Gdb_DDD-howto,


From: Terry Porter
Subject: Re: [avr-gcc-list] Re: Yet another Avr-gcc_Simulavr_Avr-Gdb_DDD-howto, Was: Re: avr-libc install problem
Date: Tue, 19 Aug 2003 18:32:44 +1000

On Tue, 19 Aug 2003 18:05:35 +1000
Erik Christiansen <address@hidden> wrote:


<snip>
>    (gdb) print SP
>    No symbol table is loaded.  Use the "file" command.
>    (gdb) file /usr/local/avr/avr/include/avr/io.h
>    A program is being debugged already.  Kill it? (y or n)

You need to use the "-g" option with avr-gcc to include debugging info in the 
elf file.

>    OK, how about ddd?. After poking around the ddd manpage, tried:
> 
>    $ simulavr -d atmega16 -g                
> 
>    $ ddd --debugger avr-gdb io.elf          but simulavr remained:
> 
> Waiting on port 1212 for gdb client to connect...

Do you have a .gdbinit in the io.elf directory configured as the docs suggest ?

Namely :-
.................gdbinit....................
## Print out structures in a sane way

echo (gdb) set print pretty
set print pretty

## Use this for debugging the remote protocol. (Don't use unless
## debugging simulavr or avr-gdb)

#echo (gdb) set debug remote 1\n
#set debug remote 1

## If you don't want specify the program to debug when invoking gdb, 
## you can tell gdb to read it in here. The file should be an elf file
## compiled with debugging information (-g for C files and -gstabs for
## asm files).

#echo (gdb) file myprog.elf\n

 file io.elf

## Connect to the remote target via a TCP socket on host:port.

echo (gdb) target remote localhost:1212\n
target remote localhost:1212

## If you are using simulavr as the remote target, this will upload
## the program into flash memory for you.

echo (gdb) load\n
load

## Set a break point at the beginning of main().

echo (gdb) break main\n
break main

## Run the program up to the first break point.  Gdb's `run` command
## does not work when using a remote target, must use continue.

echo (gdb) continue\n
continue
................................................................

<snip>

>    Now to try to find out how to supplement its symbol table. (The
>    manpage informs that "info gdb" has the manual's content, so that's
>    my current reference.)

See above :)

-- 
Kind Regards
Terry
* See my Gnu/Linux EDA webpage at : http://milkstone.d2.net.au/             
* Free Software provided by GNU; 
http://www.gnu.org/philosophy/free-software-for-freedom.html 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]