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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,648d77c9ea27b233 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 13:25:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0900.news.uu.net!reader0902.news.uu.net!not-for-mail Sender: cmorgan@elrond Newsgroups: comp.lang.ada Subject: Re: Catching Ada exceptions in C on an SGI References: <86g08jwhdy.fsf@mihalis.net> From: Chris Morgan Date: 16 Oct 2001 16:22:19 -0400 Message-ID: <867ktvwd1g.fsf@mihalis.net> Organization: Linux Hackers Unlimited User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 199.172.169.19 X-Trace: 1003263913 reader2.ash.ops.us.uu.net 19071 199.172.169.19 Xref: archiver1.google.com comp.lang.ada:14749 Date: 2001-10-16T16:22:19-04:00 List-Id: "Dale Pennington" writes: > > Wrap the functions in Ada, catch exceptions in the wrappers, and call > > them from C. > > I think that may be where I am heading, as I cannot do it in C and C++ (I > have tried with no success). Of course this means convincing my boss to let > me load GNAT onto our development machine, which will take some work (he is > a C person). You can install and use GNAT in your own account without disturbing anyone elses gcc, and without root privilege. That's enough to at least try it. > > One thing I would like to check. The current Ada library already exports > adainit and adafinal. So this new wrapped library obviously cannot use the > same symbols for its init and final. Would the method be to run the bind > function, then edit the result .ads and .adb for my own name before > gnatmakeing and linking it ? That might work, there may be a better way - check the GNAT manuals. adainit and adafinal are just made up names (although possibly emitted by tools) you could change them to be wrapperinit and wrapperfinal I would guess. good luck -- Chris Morgan