[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] AVR Studio lacks ability to displayout-of-scopevariab
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] AVR Studio lacks ability to displayout-of-scopevariables? (was: Frame pointer location) |
Date: |
Wed, 1 Sep 2010 20:56:25 +0200 (MET DST) |
"Weddington, Eric" <address@hidden> 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:
address@hidden 76% cat foo.c
int
foo(int i)
{
int j = 42 + i;
extern int bar(int);
return bar(j);
}
address@hidden 77% avr-gcc -gdwarf-2 -O0 -c foo.c
address@hidden 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. ;-)