comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey Creem" <jeff@thecreems.com>
Subject: Re: Howto debug seg-faulting Ada 95 code?
Date: Tue, 03 Sep 2002 11:20:26 GMT
Date: 2002-09-03T11:20:26+00:00	[thread overview]
Message-ID: <_V0d9.120646$_91.183808@rwcrnsc51.ops.asp.att.net> (raw)
In-Reply-To: asSc9.5091$Ss7.1261527110@newssvr30.news.prodigy.com


"Pat Rogers" <progers@classwide.com> wrote in message
news:asSc9.5091$Ss7.1261527110@newssvr30.news.prodigy.com...
> >
> > Having said that, every compiler I have used does something like
> this.  It
> > also tends to
> > make intuitive sense.
>
> Humm, every compiler I have used did not.  Declarations within library
> units are just the first things pushed. We don't think of that initial
> stack push as being a stack operation because it is never "popped"
> until the program completes.
>
>

Well, as I said there is nothing in the LRM that I know of that requires
either behaviour so
it is certainly possible that you are correct.

Another poster was more precise when he said he sees x86 compilers put these
in the
data segment (initialized or uninitiazed).

The compiler I have seen which put package level variables "not on the
stack" are

VADS -> 68K vxWorks
VADS -> MIPS vxWorks
VADS -> PowerPC vxWorks
Apex -> Solaris
GNAT -> Solaris
GNAT -> win32/linux

It seems like a strange convention to allocate package level variables on
the stack. It now means
that in a multi-tasking program you have tasks mucking in the stack of
another task.... Again, no reason
that I can think of that this would not work but it does feel odd.






  reply	other threads:[~2002-09-03 11:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-31  7:58 Howto debug seg-faulting Ada 95 code? Karl Ran
2002-08-31  8:14 ` Florian Weimer
2002-09-02 15:05   ` Karl Ran
2002-09-02 16:25     ` Jeffrey Creem
2002-09-02 16:47       ` Pat Rogers
2002-09-02 22:40         ` Jeffrey Creem
2002-09-02 23:25           ` Pat Rogers
2002-09-03 11:20             ` Jeffrey Creem [this message]
2002-09-04 14:57               ` Pat Rogers
2002-09-03  8:51       ` Sergey Koshcheyev
2002-09-03 11:42         ` Samuel Tardieu
2002-09-07 18:50           ` Steven Deller
2002-09-02 21:35     ` Florian Weimer
2002-09-03  9:11       ` Karl Ran
2002-09-03  2:27 ` David C. Hoos, Sr.
2002-09-03  9:38   ` Karl Ran
2002-09-03 12:15     ` David C. Hoos, Sr.
replies disabled

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