comp.lang.ada
 help / color / mirror / Atom feed
From: wkernow@gmail.com
Subject: pragma import => pointer in mapping table ?
Date: Tue, 5 Nov 2013 01:49:31 -0800 (PST)
Date: 2013-11-05T01:49:31-08:00	[thread overview]
Message-ID: <2d53ec9f-1ae1-4547-ac08-6fef44ab490f@googlegroups.com> (raw)

Hello,

This is the first time I write in a newsgroup.

In my code, I have : 

pragma import (C, X, "varX_C");

with everything that I need before (pragma convention, declaration of varX, "X_C" comes from a C file) 

Code is ok but my problem is about mapping file. Mapping table is a file which identifies each variable by an address. This file come from toolchain (varX 0x01891234)

In deed, I saw that all variables X derived from a "pragma import" are considered as pointers in mapping table whereas variables type of varX are not access types (basic types).

My hypothesis is that pragma import create an access to C data "varX_C" from a exterior point of view of ada code (so by mapping table).

To confirm my hypothesis, 2 questions : 
1) Are you ok ?
2) Is possible to define an option in toolchain in order to define adressing mode (for addresses in mapping file from pragma import) in direct mode (on ADA data) instead of indirect mode (on C data). Or is it a default option ?

if I'm wrong or you don't understand :
3) In genaral, I don't understand how a basic variable (type BOOLEAN) in ADA code can be considered as a pointer to a BOOLEAN in an mapping file derived from toolchain ?

Thank you

             reply	other threads:[~2013-11-05  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  9:49 wkernow [this message]
2013-11-05 12:56 ` pragma import => pointer in mapping table ? Simon Wright
2013-11-05 18:27   ` wkernow
2013-11-05 21:12     ` Simon Wright
2013-11-08 18:52 ` Per Sandberg
  -- strict thread matches above, loose matches on Subject: below --
2013-11-05  9:23 Pragma " wkernow
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox