From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer?
Date: Sat, 01 Apr 2006 09:33:33 -0500
Date: 2006-04-01T09:33:33-05:00 [thread overview]
Message-ID: <fif2g3-a7j.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <LIednWDbPNgXGbPZRVnysQ@pipex.net>
Doobs wrote:
> I was under the impression that code of the following form :
>
> X : <Some Type>;
> Y : <Some Type>;
> for Y'Address use X'Address;
>
> would result in an overlay in the resulting code. However on a project
> where external test equipment showed that the contents of X were NOT the
> same as Y I investigated further. I checked on both a Windows host version
> of GCC (3.4.2) and a target cross compiler (GCC 3.4.4) and on both the
> construct above is actually implemented using indirection (a pointer). The
> map file and symbol table show that irrespective of the data type and size
> of Y it is always implemented as a pointer to X. Although this appears
> semantially identical to an overlay as far as the progam is concerned it is
> NOT identical as far as an external observer is concerned. I have a bit
> packed record which I wanted to return as an array of longwords to pretty
> dumb test equipment. The easiest way *would* be to overlay a longword
> array - however this would not appear to be possible.....
>
>
>
Try applying pragma volatile to both declarations. Also for completeness
you should add a pragma import to Y to avoid any default initialization.
There is an AI that talks (to some exent) to this issue.
I am not entirely sure that the volatile will fix your problem because I
don't quite get what the resulting behaviour is that you are
seeing/not seeing.
next prev parent reply other threads:[~2006-04-01 14:33 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-01 13:47 Any way of persuading GNAT/GCC to implement a true overlay and not a pointer? Doobs
2006-04-01 14:33 ` Jeffrey Creem [this message]
2006-04-01 16:52 ` Doobs
2006-04-01 17:56 ` Martin Krischik
2006-04-01 18:04 ` Dmitry A. Kazakov
2006-04-01 17:08 ` Florian Weimer
2006-04-01 17:54 ` Doobs
2006-04-01 18:19 ` Doobs
2006-04-01 20:01 ` Jeffrey Creem
2006-04-01 21:33 ` Doobs
2006-04-03 12:25 ` Gerd
2006-04-01 20:57 ` Dmitry A. Kazakov
2006-04-04 1:23 ` Randy Brukardt
2006-04-10 1:42 ` Justin Gombos
2006-04-10 20:12 ` Randy Brukardt
2006-04-11 13:54 ` Making money on open source, if not by selling _support_, then how? Marc A. Criley
2006-04-11 15:13 ` Justin Gombos
2006-04-11 16:22 ` Dmitry A. Kazakov
2006-04-11 17:56 ` Justin Gombos
2006-04-11 18:38 ` Georg Bauhaus
2006-04-12 13:59 ` Justin Gombos
2006-04-12 14:39 ` Georg Bauhaus
2006-04-15 19:33 ` Justin Gombos
2006-04-12 17:07 ` Larry Kilgallen
2006-04-13 3:16 ` Justin Gombos
2006-04-11 19:59 ` Randy Brukardt
2006-04-11 20:18 ` Ed Falis
2006-04-12 14:10 ` Justin Gombos
2006-04-12 20:57 ` Randy Brukardt
2006-04-15 20:37 ` Justin Gombos
2006-04-18 0:24 ` Randy Brukardt
2006-04-18 16:02 ` Justin Gombos
2006-04-12 19:27 ` Martin Dowie
2006-04-12 8:32 ` Dmitry A. Kazakov
2006-04-12 11:23 ` Georg Bauhaus
2006-04-12 15:34 ` Dmitry A. Kazakov
2006-04-12 17:11 ` Georg Bauhaus
2006-04-12 19:37 ` Dmitry A. Kazakov
2006-04-12 21:56 ` Georg Bauhaus
2006-04-13 9:17 ` Dmitry A. Kazakov
2006-04-13 14:18 ` Georg Bauhaus
2006-04-14 10:01 ` Dmitry A. Kazakov
2006-04-14 12:55 ` Georg Bauhaus
2006-04-15 10:13 ` Dmitry A. Kazakov
2006-04-15 18:07 ` Georg Bauhaus
2006-04-13 2:58 ` Justin Gombos
2006-04-13 9:17 ` Dmitry A. Kazakov
2006-04-15 21:17 ` Justin Gombos
2006-04-16 10:53 ` Dmitry A. Kazakov
2006-04-16 13:03 ` Georg Bauhaus
2006-04-16 17:59 ` Dmitry A. Kazakov
2006-04-16 20:53 ` Georg Bauhaus
2006-04-17 9:16 ` Dmitry A. Kazakov
2006-04-19 20:38 ` Justin Gombos
2006-04-20 18:01 ` Dmitry A. Kazakov
2006-04-18 0:29 ` Randy Brukardt
2006-04-16 14:55 ` Justin Gombos
2006-04-16 17:59 ` Dmitry A. Kazakov
2006-04-19 18:17 ` Justin Gombos
2006-04-20 18:07 ` Dmitry A. Kazakov
2006-04-11 15:34 ` Justin Gombos
2006-04-12 2:59 ` Steve
2006-04-13 7:41 ` Jean-Pierre Rosen
2006-04-13 13:18 ` Marc A. Criley
2006-04-13 13:35 ` Dmitry A. Kazakov
2006-04-13 13:57 ` Making money on open source, if not by selling _support_, then Larry Kilgallen
2006-04-13 19:37 ` Justin Gombos
2006-04-13 21:02 ` Larry Kilgallen
2006-04-14 2:49 ` Justin Gombos
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox