[Top][All Lists]

[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: Theodore A. Roth
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 09:04:23 -0700 (PDT)

On Tue, 19 Aug 2003, Erik Christiansen wrote:

> On Tue, Aug 19, 2003 at 06:32:44PM +1000, Terry Porter wrote:
> > You need to use the "-g" option with avr-gcc to include debugging info
> > in the elf file.
>    So far, I've been using:
> avr-gcc -c -g -x assembler-with-cpp -mmcu=atmega16 -DMCU=atmega16 init.s io.s
> avr-ld  -T ld.lnk -o app.elf init.o io.o

Replace "-g" with "-Wa,--gstabs".

You use -g for C files compiled with the C backend and --gstabs for
asm files assembled with gas.

NOTE: you never want to compile C code with both -g and -Wa,--gstabs.
You get two competing sets of symbols and gdb goes all wonky (spent 2
weeks last year tracking that one down).

Ted Roth

PS: Any chance you could not indent your messages? When mixed in with
replies it makes for a tough read.

reply via email to

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