comp.lang.ada
 help / color / mirror / Atom feed
From: logan@jrs.com (Brad Logan)
Subject: Exception handlers across dynamically linked libraries
Date: 8 Nov 1994 21:57:17 GMT
Date: 1994-11-08T21:57:17+00:00	[thread overview]
Message-ID: <39os7t$lob@sequoia.jrs.com> (raw)


Has anyone tried to use shareable libraries with TeleSoft 4.1a on SunOS
4.1.3?

I am having trouble getting the exception handlers to work in the
following situation.  We desire to be able to add "servers"  onto a
program without having to re-link the program each time.  The essense of
the structure is diagramed below.   The "core" routine calls a
"server", who in turn calls a "shared utility".  The utilties are also
used by the core and can be linked with the core to create a 
static program image.  These will not change with time, but which servers
are present will.  


statically	|	shared library
linked	image	|	dynamically linked
-------------------------------------------
		|
		|
shared		|
utility		|
		|
		|
		|
		|	server
		|
		|
core		|

I've been able to get the basic calling sequence to work, but
regression tests revealed the exception handlers within the servers are
bypassed entirely.  That is, whether an exception is raised in the
shared utility or within the server, the exception handler within the
server does NOT catch the exception, even a "when others" clause does
nothing.

I've found a master table created when the static image is linked
called ADA_GLOBAL_MAP that contains entries for all the compilation
units in the static image.  I've tried putting placeholder packages in
the static image and then updating the table as the shared library is
opened by replacing the placeholders with the dynamically linked
packages. From tracebacks, the dynamic servers now seem to be passed
thru in the call chain, but are still not recognizing the exceptions
defined in the utilties or locally.

Any ideas would be much appreciated.

Brad

-----------------------------------------------------------
Bradley C. Logan                    Research Specialist
JRS Research Laboratories, Inc      714-974-2201 (voice)
1036 W. Taft Ave                    714-974-2540 (FAX)
Orange, CA 92665-4121               logan@jrs.com (internet)




                 reply	other threads:[~1994-11-08 21:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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