"Weddington, Eric" <eric.wedding...@atmel.com> wrote:

> I just want to be sure, right now, =
> if the required debug information is being generated in the ELF file for =
> *any* debugger to take advantage of.

I think it does:

j...@uriah 76% cat foo.c
int
foo(int i)
{
   int j = 42 + i;

   extern int bar(int);

   return bar(j);
}
j...@uriah 77% avr-gcc -gdwarf-2 -O0 -c foo.c
j...@uriah 78% avr-readelf --debug-dump foo.o
[...]
 <2><41>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <42>   DW_AT_name        : i
    <44>   DW_AT_decl_file   : 1
    <45>   DW_AT_decl_line   : 2
    <46>   DW_AT_type        : <0x5a>
    <4a>   DW_AT_location    : 2 byte block: 8c 3       (DW_OP_breg28: 3)
 <2><4d>: Abbrev Number: 4 (DW_TAG_variable)
    <4e>   DW_AT_name        : j
    <50>   DW_AT_decl_file   : 1
    <51>   DW_AT_decl_line   : 4
    <52>   DW_AT_type        : <0x5a>
    <56>   DW_AT_location    : 2 byte block: 8c 1       (DW_OP_breg28: 1)
[...]

I guess the key point is not so much the DWARF-2 information, but
actually detecting each function's stack frame.  Ted implemented a
bunch of heuristics in GCC for this (if I remember it well, it's been
a while ago I've been looking into this last time).

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to