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

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

Re: [avr-gcc-list] Unable to debug code relocated with "-Ttext=" (e.g. b


From: Torleif Sandnes
Subject: Re: [avr-gcc-list] Unable to debug code relocated with "-Ttext=" (e.g. bootloader)
Date: Tue, 05 Apr 2005 10:57:12 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Pieter Conradie wrote:

> AVR Studio and GDB/Insight is unable to debug code when it is relocated with
> the linker option "-Ttext=0x1E000" for an ATmega128, e.g. when creating a
> bootloader application.
>
> This was experienced with WinAVR-20050214 and AVR Studio 4.11, by loading
> dwarf-2 and stabs debug format (ELF and COFF).
>
> I can verify that the code is correctly generated by inspecting the
> dissassembly, but the C debugging info is mangled, e.g. the "main" starting
> point is incorrectly displayed as "address@hidden: main", in stead of the
> proper location of "0000F0B9".


AFAICS, this is another symptom of the 64K address limitation of avr-gcc's DWARF output.

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

I have debugged the problem and looked at the DWARF debug information. The parser component maps source to address and address to source exactly as defined in the debug information.

The problem is that the debug information addresses can not be larger than 0xffff. When code is relocated beyond this, 0x1E000 becomes 0xE000.

As Eric points out, the elf/dwarf parser does not load arbitrarily named sections. only .text .bss .eeprom and .data is loaded. I have plans to rewrite the memory loading to include all sections, but I don't know when I will have the time. This will not solve the 64K limitation of avr-gcc

Regards,

Torleif





reply via email to

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