Browse Prior Art Database

Dynamic Interception of Imported Procedure Calls

IP.com Disclosure Number: IPCOM000117222D
Original Publication Date: 1996-Jan-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 6 page(s) / 201K

Publishing Venue

IBM

Related People

Blaschke, DE: AUTHOR

Abstract

Disclosed is a method for dynamically intercepting imported procedure calls without requiring alterations to the source code of the importing or exporting applications.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 37% of the total text.

Dynamic Interception of Imported Procedure Calls

      Disclosed is a method for dynamically intercepting imported
procedure calls without requiring alterations to the source code of
the importing or exporting applications.

      Software organizations have a critical need to analyze the
programming interfaces provided by both operating systems and
applications.  For example, function and system test organizations
need to trace procedure input and output parameters, as well as
return codes, to determine the code path coverage being attained and
to determine whether procedures are functioning properly.
Performance organizations are interested in measuring the length of
time a procedure requires to accomplish each of its tasks.  Customer
support needs to determine program logic flow to get a better
understanding of why a customer's application fails.

      The conventional methods for meeting these needs are either to
incorporate procedure wrappers within the application invoking
(importing) the programming interface, or alternately to incorporate
hooks in the procedures within the application defining (exporting)
the programming interface.  While these wrappers and hooks can easily
trace procedure input and output parameters and return codes, and can
easily measure timing by capturing procedure entry and exit times, an
underlying problem with each of these methods is that modification is
required to source code of the importing or exporting application,
along with recompilation, relinking, and redistribution of the
finished product.  The nature of this problem eliminates the
possibility of intercepting and analyzing procedures imported by
off-the-shelf applications, as the source code is generally
unavailable.

      The presently-disclosed method relies on the fact that
operating systems supporting dynamic linking require a means for
resolving dynamic link references, to successfully load applications
which import procedures.  This resolution may be achieved by
generating a relocation record for each imported procedure that
contains the module name and the procedure name or ordinal.  Another
method, which reduces or optimizes link time, generates a relocation
record for each imported procedure that contains the index into a
module name table as well as an ordinal or an index into a procedure
name table.  In this way, only a single module name string per module
and a single procedure name string per procedure is required,
regardless of the number of invocations.  Another method, which
reduces or optimizes load time, generates code for each imported
procedure, with the code jumping to common code invoking the
procedure.  This method requires only a single relocation record per
procedure, regardless of the number of invocations, with the
relocation record using one of the previously-described methods to
identify the module and procedure.  Combinations or variations of
these methods are also possible, but the name of...