comp.lang.ada
 help / color / mirror / Atom feed
* Exception handlers across dynamically linked libraries
@ 1994-11-08 21:57 Brad Logan
  0 siblings, 0 replies; only message in thread
From: Brad Logan @ 1994-11-08 21:57 UTC (permalink / 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)




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-11-08 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-08 21:57 Exception handlers across dynamically linked libraries Brad Logan

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