[Top][All Lists]

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

Re: [avr-gcc-list] debugging information in assembler file for gdb/ddd

From: Theodore A. Roth
Subject: Re: [avr-gcc-list] debugging information in assembler file for gdb/ddd
Date: Tue, 12 Mar 2002 10:35:43 -0700 (MST)

Hi Klaus,

You need to pass the --gstabs option to the assembler. Also, if you do 
that, I don't think you need the -g option for gcc. Try this to get an 
obj file which can be considered a standalone program:

  $ avr-gcc -Wa,-gstabs -xassembler-with-cpp -mmcu=at90s8515 -nostdlib \
        file.s -o file.o

or if you want to be able to link with C obj files:

  $ avr-gcc -Wa,-gstabs -xassembler-with-cpp -mmcu=at90s8515 -c \
        file.s -o file.o

Use this to see that the stabs are in the .stab section of the object 

  $ avr-objdump -h -S -D --stabs --disassemble-zeroes file.o

Either of those seem to work for me.

Note that "-Wa,-gstabs" is not "-Wa,--gstabs". The "-Wa," part adds the 
first - for you.

Ted Roth

On Tue, 12 Mar 2002, Klaus Rudolph wrote:

>Hi all,
>i use the simulavr in combination with the avr-gdb 5.1 with patch and the
>ddd gui.
>For c-sources all is really fine, but for assembler projects i can't get the
>debug information
>in the objectfile. I "compile" it with 
>avr-gcc -xassembler-with-cpp -g file1.s -o test.o
>There file1.s include some other assembler files.
>Is there an additional option for the compiler to create the debug infos? 
>I see the function names in the dissassemblerlisting but can't get the
>After loading, gdb says:
>(no debugging symbols found)...0x00000000 in ?? ()
>Any ideas?
>     Klaus

avr-gcc-list at http://avr1.org

reply via email to

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