public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: James Bowman <james.bowman@ftdichip.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Harvard architecture and gdb
Date: Wed, 13 Jan 2016 03:32:00 -0000	[thread overview]
Message-ID: <CA9BBF0458F83C4F9051448B941B57D12208FB58@glaexch3> (raw)

I am maintainer for a Harvard architecture target, FT32.

FT32 has two address spaces, flash and RAM. They both occupy addresses starting at address 0. This is similar to AVR. We use a __flash__ modifier to specify address space 1.

But I am struggling to understand how to describe the architecture to gdb. In particular FT32 uses address spaces to distinguish between pointers to RAM and flash. But gdb only seems to actually care about address spaces for *pointers*. When gcc writes the debug info for a plain object, it does not emit the DW_AT_address_class field; nor does gdb handle DW_AT_address_class for non-pointer types.  So I am at a loss to understand how these two variables would be distinguished by gdb:

  int ram_var = 1234;
  __flash__ const int flash_var = 1234;

I suspect I have misunderstood something fundamental. Does anyone have any suggestions? Thanks.

--
James Bowman
FTDI Open Source Liaison

             reply	other threads:[~2016-01-13  3:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  3:32 James Bowman [this message]
2016-01-13 13:34 ` Luis Machado
2016-01-13 18:06 duane

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=CA9BBF0458F83C4F9051448B941B57D12208FB58@glaexch3 \
    --to=james.bowman@ftdichip.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).