AVR - invalid address used when evaluating a variable
Christo
christo.crause@gmail.com
Wed Jun 27 05:33:00 GMT 2018
On Tue, 2018-06-26 at 22:01 -0400, Simon Marchi wrote:
> On 2018-06-26 16:32, Christo wrote:
> >
> > I have also tested an equivalent C program compiled with avr-gcc, with
> > gdb reading the correct
> > SRAM address for the value of i. Â This makes me wonder if the symbol
> > information generated by
> > Freepascal is correct?
> Looking quickly, that's what I see.  The variable "i" in your program isÂ
> described as:
>
> Â <1><ca>: Abbrev Number: 3 (DW_TAG_variable)
>      <cb>   DW_AT_name        : i
>      <cd>   DW_AT_location    : 3 byte block: 3 60 0     (DW_OP_addr: 60)
>
> In my C test program (compiled with -gdwarf-4), a global variableÂ
> appears as:
>
> Â <1><5e0>: Abbrev Number: 11 (DW_TAG_variable)
>      <5e1>   DW_AT_name        : foo
> Â Â Â Â Â ...
>      <5ec>   DW_AT_location    : 5 byte block: 3 60 0 80 0      Â
> (DW_OP_addr: 800060)
>
> So I guess Freepascal should do the same, map data addresses atÂ
> 0x800000.
>
> Simon
Simon,
Thank you very much for your feedback. Â I will take this issue to the Freepascal forum.
Best regards,
Christo
More information about the Gdb
mailing list