From: Simon Marchi <simon.marchi@polymtl.ca>
To: Christo <christo.crause@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: AVR - invalid address used when evaluating a variable
Date: Wed, 27 Jun 2018 02:01:00 -0000 [thread overview]
Message-ID: <72704ba7eefa2c224afcbbb4e427cee5@polymtl.ca> (raw)
In-Reply-To: <1530045135.6272.16.camel@gmail.com>
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
next prev parent reply other threads:[~2018-06-27 2:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-24 19:28 Christo
2018-06-26 1:02 ` Simon Marchi
2018-06-26 20:32 ` Christo
2018-06-27 2:01 ` Simon Marchi [this message]
2018-06-27 5:33 ` Christo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72704ba7eefa2c224afcbbb4e427cee5@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=christo.crause@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox