From: Simon Wright <simon@pushface.org>
Subject: Re: Last chance handler on a PC
Date: Fri, 31 Jan 2020 11:19:49 +0000
Date: 2020-01-31T11:19:49+00:00 [thread overview]
Message-ID: <ly1rrfan56.fsf@pushface.org> (raw)
In-Reply-To: ly5zgrani4.fsf@pushface.org
Simon Wright <simon@pushface.org> writes:
> Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>
>> I had a similar elaboration problem some time ago in an embedded
>> application, where I wanted to set up some HW error-trap handlers that
>> I would like to be active also during elaboration, but I found no easy
>> way to ensure that the trap-handling package would be elaborated
>> before all other packages.
>
> Could you have used pragma Restrictions (No_Elaboration_Code); ?
>
> Or pragma No_Elaboration_Code_All --
> This is a program unit pragma (there is also an equivalent aspect of
> the same name) that establishes the restriction No_Elaboration_Code
> for the current unit and any extended main source units (body and
> subunits). It also has the effect of enforcing a transitive
> application of this aspect, so that if any unit is implicitly or
> explicitly with’ed by the current unit, it must also have the
> No_Elaboration_Code_All aspect set. It may be applied to package or
> subprogram specs or their generic versions.
>
> (I've done this in Cortex GNAT RTS, so that I could write the startup
> code in Ada).
Sorry, that was stupid: you needed the package to have elaboration code
so that it could set up the error-trap handlers!
next prev parent reply other threads:[~2020-01-31 11:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 8:55 Last chance handler on a PC ahlan
2020-01-30 9:15 ` J-P. Rosen
2020-01-30 9:17 ` Egil H H
2020-01-30 19:27 ` ahlan
2020-01-31 5:53 ` J-P. Rosen
2020-01-31 7:00 ` Jeffrey R. Carter
2020-01-31 8:51 ` J-P. Rosen
2020-01-30 9:25 ` Dmitry A. Kazakov
2020-01-30 19:10 ` Lucretia
2020-01-30 19:35 ` ahlan
2020-01-30 20:02 ` Jeffrey R. Carter
2020-01-30 20:26 ` Niklas Holsti
2020-01-30 20:51 ` Jeffrey R. Carter
2020-01-30 21:32 ` Niklas Holsti
2020-01-31 11:12 ` Simon Wright
2020-01-31 11:19 ` Simon Wright [this message]
2020-01-31 12:30 ` Niklas Holsti
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox