Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  The Development Environment Wrappers  Previous   Contents   Next 
   
 

/usr/lib/isaexec

isaexec(3C) is a 32-bit executable binary file that performs the wrapper function outlined in the shell script wrapper presented in the immediately preceding description, but with precise preservation of the argument list. The executable's full pathname is /usr/lib/isaexec, but it is not designed to be executed by that name. Rather, it can be copied or linked (hard link, not soft link) to the primary name of a program that exists in more than one version, selected using isalist(1).

For example, the command truss(1) exists as three executable files:

/usr/bin/truss
/usr/bin/sparcv7/truss
/usr/bin/sparcv9/truss

The executables in the sparcv7 and sparcv9 subdirectories are the real truss(1) executables, 32-bit and 64-bit respectively. The wrapper file, /usr/bin/truss, is a hard link to /usr/lib/isaexec.

The isaexec(3C) wrapper determines its own fully resolved symlink-free path name using getexecname(3C), independent of its argv[0] argument, gets the isalist(1) through sysinfo(SI_ISALIST, ...), and performs an exec(2) of the first executable file bearing its own name found in the resulting list of subdirectories of its own directory. It then passes the argument vector and environment vector unchanged. In this way, argv[0] passed to the final program image appears as first specified, not as transformed into a full path name modified to contain the name of the subdirectory.


Note - Because wrappers might exist, you need to be careful when moving executables to different locations. You might move the wrapper rather than the actual program.


isaexec()

Many applications already use startup wrapper programs to set environment variables, clear temporary files, start daemons, and so on. The isaexec(3C) interface in libc(3LIB)allows the same algorithm used in the shell-based wrapper example above to be invoked directly from a custom wrapper program.

Debugging

All of the Solaris debugging tools have been updated to work with 64-bit applications. This includes the truss(1) command, the /proc tools (proc(1)), adb, dbx, and adbgen.

The dbx debugger, capable of debugging 64-bit applications, is available as part of the Sun Workshop tool suites. The remaining tools are included with the Solaris release.

adbgen generates a program to make a given adb(1) macro. Consequently, it needs to be run on a 64-bit system with the -m lp64 option to generate 64-bit macros. See the adbgen(1M) man page for more information.

The options for all these tools except adbgen are unchanged. A number of enhancements were made to adb for debugging 64-bit programs. As expected, using "*" to dereference a pointer will dereference 8 bytes for 64-bit programs and 4 bytes for 32-bit programs. In addition, the following new modifiers were added:

Additional ?, /, = modifiers:
	
g		(8) Display 8 bytes in unsigned octal	
G		(8) Display 8 bytes in signed octal
e		(8) Display 8 bytes in signed decimal	
E		(8) Display 8 bytes in unsigned decimal
J		(8) Display 8 bytes in hexadecimal
K		(n) Print pointer or long in hexadecimal
		  Display 4 bytes for 32-bit programs
		  and 8 bytes for 64-bit programs.
y		(8) Print 8 bytes in date format
 
Additional ? and / modifiers:
 
M <value> <mask>  Apply <mask> and compare for 8-byte value;
		  move '.' to matching location.
Z		(8) write 8 bytes
 
 
 
  Previous   Contents   Next