Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Christo <christo.crause@gmail.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb@sourceware.org, christo.crause@gmail.com
Subject: Re: AVR - invalid address used when evaluating a variable
Date: Wed, 27 Jun 2018 05:33:00 -0000	[thread overview]
Message-ID: <1530077609.7468.4.camel@gmail.com> (raw)
In-Reply-To: <72704ba7eefa2c224afcbbb4e427cee5@polymtl.ca>

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


      reply	other threads:[~2018-06-27  5:33 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
2018-06-27  5:33       ` Christo [this message]

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=1530077609.7468.4.camel@gmail.com \
    --to=christo.crause@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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