comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: System.Address_to_Access_Conversions
Date: 1998/07/13
Date: 1998-07-13T00:00:00+00:00	[thread overview]
Message-ID: <ud8b9a9xx.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 6odddl$k94$1@nnrp1.dejanews.com

jsanchor@my-dejanews.com writes:

> <snip>
> 
> I tried casting
> Ptr_to_Data := Ptr_to_Data_Type(Data_Ptr); --It compiled..but when I ran it
> SEGMENTATION FAULT ERROR showed up.
> Can anybody suggest how do I get the correct access type to point to memory.

You have the correct Ada syntax (that's why it compiled), but the
Operating System is not letting you write to that address (that's what
SEGMENTAION FAULT means).

The cure depends on what OS you are using. Most will NOT let you write
directly to arbitrary addresses (I assume this is a hardware device
register?) from user code. You will need to write a piece of code that
runs in kernel mode (normally called a "device driver").

If you give us more details about what's at that memory location, what
OS and CPU you are using, we might be able to help.
> 
> Thank you in advance.
> Jay S.
>
 You're welcome

-- Stephe




  reply	other threads:[~1998-07-13  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-13  0:00 System.Address_to_Access_Conversions jsanchor
1998-07-13  0:00 ` Stephen Leake [this message]
1998-07-14  0:00   ` System.Address_to_Access_Conversions jsanchor
1998-07-14  0:00 ` System.Address_to_Access_Conversions Anonymous
1998-07-14  0:00 ` System.Address_to_Access_Conversions Pascal MALAISE
1998-07-14  0:00   ` System.Address_to_Access_Conversions jsanchor
1998-07-14  0:00     ` System.Address_to_Access_Conversions David C. Hoos, Sr.
1998-07-14  0:00       ` System.Address_to_Access_Conversions nabbasi
1998-07-14  0:00         ` System.Address_to_Access_Conversions David C. Hoos, Sr.
1998-07-15  0:00           ` System.Address_to_Access_Conversions jsanchor
1998-07-15  0:00             ` System.Address_to_Access_Conversions David C. Hoos, Sr.
1998-07-14  0:00         ` System.Address_to_Access_Conversions Robert Dewar
1998-07-26  0:00         ` System.Address_to_Access_Conversions Matthew Heaney
1998-07-26  0:00           ` System.Address_to_Access_Conversions nababsi
1998-07-26  0:00             ` System.Address_to_Access_Conversions Charles Hixson
1998-07-26  0:00               ` System.Address_to_Access_Conversions Robert Dewar
1998-07-26  0:00             ` System.Address_to_Access_Conversions Charles Hixson
1998-07-26  0:00             ` System.Address_to_Access_Conversions Matthew Heaney
1998-07-26  0:00               ` System.Address_to_Access_Conversions Robert Dewar
1998-07-26  0:00                 ` System.Address_to_Access_Conversions nabbasi
1998-07-26  0:00             ` System.Address_to_Access_Conversions Robert Dewar
1998-07-14  0:00       ` System.Address_to_Access_Conversions jsanchor
1998-07-14  0:00         ` System.Address_to_Access_Conversions David C. Hoos, Sr.
  -- strict thread matches above, loose matches on Subject: below --
1998-07-15  0:00 System.Address_to_Access_Conversions Marin David Condic, 561.796.8997, M/S 731-96
1998-07-26  0:00 ` System.Address_to_Access_Conversions Matthew Heaney
1998-07-27  0:00 System.Address_to_Access_Conversions Marin David Condic, 561.796.8997, M/S 731-96
1998-07-28  0:00 ` System.Address_to_Access_Conversions Stephen Leake
replies disabled

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