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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9dc211b60aca51d,start X-Google-Attributes: gid103376,public From: palumbo@my-dejanews.com Subject: Ada Enumerates Date: 1998/07/07 Message-ID: <6ntpm6$pfd$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 369152541 X-Http-User-Agent: Mozilla/4.04 [en] (Win95; I) Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Jul 07 18:25:24 1998 GMT Newsgroups: comp.lang.ada Date: 1998-07-07T00:00:00+00:00 List-Id: I'm having trouble with Ada Enumerates causing a BUS error within the GNAT library functions. I'm using GNAT 2.07 on an SGI. I only have the problem when I attempt to link the Ada code with C code (with C having the "main" routine). I don't have the problem when GNAT produces the executable itself using an Ada test driver. I'm attempting to read an enumerate value from a data file. I've got the line package HPRF_MODES_MODE_IO is new TEXT_IO.ENUMERATION_IO(HPRF_MODES_TYPE); and I'm doing: HPRF_MODES_IO.GET(FILE => CURRENT_FILE, ITEM => SENSOR_DATA(SENSOR_MODEL).HPRF_MODES ); but the program BUS Errors in the HPRF_MODES_MODES_IO.GET in the library routine SYSTEM.VAL_ENUM.VALUE_ENUMERATION on the code below: For J in 0 .. Last_Pos loop ====>>> if T(J).all = S(F .. L) Then return J; end if; end loop; It appears the S(F .. L) is the string from the file (read in correctly) so I assume the problem is in the T(J).all. I assume this should be all the possible strings this enumerate can be but I'm unable to view it within CVD. T is declared as: T : constant Enum_Table_Ptr := A_To_T (A); I also have a BUS Error when I attempt to do a 'VALUE for this same enumerate. Is there any way I can look at this Enum_Table to see that it is correct? To compound the problem a few other enumerates are working fine (when reading in from a file) but not all. I don't understand why this works on some enumerates and not others and why this works fine when creating a completely Ada executable but not always work when linking with C (I'm calling adainit() prior to calling the Ada code). Also, where can I find the complete gdb for Ada for IRIX release. I've only seen "diff" files from previous versions. I've currently got 4.13.gnat.1.6 and would like to find a newer version. Any help would be appreciated. Paul P. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum