R-alpha: Static Loading

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Fri, 16 Aug 1996 12:45:42 +1200


Date: Fri, 16 Aug 1996 12:45:42 +1200
From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Message-Id: <199608160045.MAA14070@stat.auckland.ac.nz>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: Static Loading
In-Reply-To: <9608150423.AA06406@yarra.vut.edu.au.vut.edu.au>

First let me say that static loading into S or R is not necessarily
a good way to debug code.  The problem is that bug in the loaded code
might not make its presence felt until after that code had returned.
This can be extremely mysterious (I speak from experience).

However, it is possible to do static loading.  The problem which
Robert Dunne has experienced are because we do not look at the
program's symbol table when we do a .Fortran or .C call.  So far we
have not found a portable way of doing this across the Unix/PC/Mac
range.  Instead, we have a static table set up in file

	R/src/main/dotcode.h

which is generated in the configuration process.  By adding lines
similar in form to those there already, you can make R "aware" of the
entry points to your statically linked code.

I might say that all this is in a state of flux at present as the
process of doing foreign language calls the subject of experimentation
at present.  If anyone can tell me about ways for a program running
under Windows or MacOS to peek into its own symbol table I'd be very
grateful.
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-