From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.231.6 with SMTP id k6mr3062471yhq.49.1383644971662; Tue, 05 Nov 2013 01:49:31 -0800 (PST) X-Received: by 10.49.127.177 with SMTP id nh17mr2266qeb.30.1383644971647; Tue, 05 Nov 2013 01:49:31 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i2no10823322qav.0!news-out.google.com!9ni9701qaf.0!nntp.google.com!i2no10823312qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 5 Nov 2013 01:49:31 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.215.45.170; posting-account=W9UEuAoAAADNIQRnlWF95-3yG4h191wg NNTP-Posting-Host: 80.215.45.170 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2d53ec9f-1ae1-4547-ac08-6fef44ab490f@googlegroups.com> Subject: pragma import => pointer in mapping table ? From: wkernow@gmail.com Injection-Date: Tue, 05 Nov 2013 09:49:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2193 Xref: news.eternal-september.org comp.lang.ada:17582 Date: 2013-11-05T01:49:31-08:00 List-Id: 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