From: "ReversedBias" <thehumblizer@hotmail.com>
Subject: Re: Ada to C Interface: Passing Pointers Via System.Address
Date: Wed, 12 Jan 2005 02:36:51 -0500
Date: 2005-01-12T02:36:51-05:00 [thread overview]
Message-ID: <70b31062323c157bbc6b42ccd0ca0945@localhost.talkaboutprogramming.com> (raw)
In-Reply-To: 5_SdnaIyCMxrCXncRVn-qg@comcast.com
I have something like this in my ada code (i don't have the exact code in
front of me right now so my syntax might be off)
struct_ptr : system.address;
struct_ptr := ada_cfunct1(input1, input2);
cfunct2(struct_ptr, input3);
Where cfunct1 returns a struct pointer and cfunct2 is a second c function
that needs the pointer as an input. When I try and run it I get a
segmentation fault and a core dump (it compiles fine). I suspect that I
am not declaring the system.address correctly. I know that my C code is
correct, and that it allocates the pointer correctly. However when I look
at the value of the memory of the struct_ptr after it has gone to ada and
back to c it says that it is null. I must not be using the system.address
correctly?
Thanks for your help,
next prev parent reply other threads:[~2005-01-12 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-12 2:16 Ada to C Interface: Passing Pointers Via System.Address ReversedBias
2005-01-12 3:09 ` tmoran
2005-01-12 7:36 ` ReversedBias [this message]
2005-01-12 8:38 ` tmoran
2005-01-12 15:50 ` Mark Lorenzen
2005-01-13 17:14 ` Martin Krischik
2005-01-13 1:25 ` Jeffrey Carter
2005-01-13 3:05 ` Steve
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox