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

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

Re: Re[3]: [avr-gcc-list] Debugging with simulavr/gdb/ddd


From: Joerg Wunsch
Subject: Re: Re[3]: [avr-gcc-list] Debugging with simulavr/gdb/ddd
Date: Thu, 5 Sep 2002 15:20:13 +0200 (MET DST)

"Theodore A. Roth" <address@hidden> wrote:

> If you want to be able to step through the source of an asm file,
> you have to tell gas to generate stabs debugging information
> (--gstabs). Just be sure not to pass --gstabs to the assembler for a
> C file you have compiled with -g or gdb will get _really_ confused
> (took me about three weeks to figure this out ;-).

Something else i just noticed: gdb gets confused about non-local
lables inside the assembler source as well, and tries to display a
totally different source file when jumping there.  Converting the
assembler source to only use local labels inside a function fixes
this.  For those who are unfamiliar with gas' concepts: a local label
in gas just uses a single number to mark the label, and the number
followed by either the letter `f' (foreward) or `b' (backward) for the
reference.  The numbers can be re-used later on, the assembler
automatically choses the label with the same number that is closest to
the spot where it is referenced from.

Apart from this, --gstabs works pretty well, thanks for the hint, Ted!

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org



reply via email to

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