------- Additional Comments From tsandnes at norway dot atmel dot com  
2005-05-09 07:01 -------
Subject: Re:  Overflowed address in dwarf debug line information

bjoern dot m dot haase at web dot de wrote:
> ------- Additional Comments From bjoern dot m dot haase at web dot de  
> 2005-05-06 14:12 -------
> Hi Torleif, 
>  
> I have just had a look at PR19885 and I am having one additional question: 
> IIUC, the lable references, that eventually cause the overflow problems refer 
> to memory in form of "byte" addresses and not "word" addresses: I.e. the 
> offsets and address information you are finding in the elf files all are 
> "byte" 
> addresses. Am I right? 

Yes. This is what I have observed.
avr-readelf with the -w switch is very useful for viewing the debug information.

> In the asm outputs I have investigated so far, I realized that for the lable 
> references in the dwarf sections avr-gcc is allocating two bytes only. So in 
> case that these two bytes are filled with "byte" addresses instead of "word" 
> addresses, it is obvious that an overflow could not be avoided. The cleanest 
> solution then would be to redefine the debugging format such that within the 
> debugging sections for the dwarf symbols, gcc allocates four bytes for the 
> pointers. I fear, however, that this would be a major challenge since one 
> would 
> probably need to rewrite a considerable portion of the 
> dwarf-output-genenerator 
> in a target-specific fashion. 
> If I'm not too wrong, we probably won't have a short term solution for this 
> PR. 

I think your explanation makes sense.

But how can target specific code be added to the dwarf output generator?
AFAIK everything AVR related must be put in the avr.c, avr.h or avr.md in the 
gcc/config directory. Must it not rather be rewritten to work for all targets 
*and* the AVR port?

Thanks for taking the time to look into this.

Torleif



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19087

Reply via email to