Search

ParaSoft

HOME
PRODUCTS
SUPPORT
ABOUT
WHAT'S NEW
EVENTS


Insure++

Quick facts

Add-on Modules:
   -INUSE
   -TCA

Comparisons

Technical Papers

Support & Manuals

FAQs

Recent Reviews

User Testimonials

Press Releases


Insure tool to debug c++





Linking with Insure++ under AIX


During installation of Insure++, special versions of libc.a are prelinked against the Insure++ libraries and stored in subdirectories of the lib.$ARCH directory of your Insure++ installation. This step is performed by the post_install script, and is what allows dynamic linking to be done with Insure++ under AIX.

During linking with Insure++, an option similar to

	-L/usr/local/parasoft/lib.aix4/lib_c4.1.3.0/lib_cSM
will be added to the link line, which will cause the linker and dynamic loader to use the Insure++ version of libc.a. Which library is used is controlled by three .psrc options (and one command line option) as shown in the table below.

Directory MallocReplace StdlibReplace ThreadedRuntime
lib_c
off
off
off
lib_cM
on
off
off
lib_cS
off
on
off
lib_cSM
on
on
off
lib_cUM
on (-Zuse)
off
off
lib_cMT
on
off
on
lib_cT
off
off
on

By default, lib_cSM/libc.a will be used, as indicated by the boldface line above, because those are the default settings of the options.

There is a potential problem with dynamic linking if you need to have your LIBPATH environment variable set. If one of the paths given contains libc.a, that library will be used and you will see undefined symbols of the form _Insight_* at runtime.

There are several solutions possible:

  • Link statically by adding the option
    	insure++.static_linking on
    
    to your .psrc file.

  • Unset your LIBPATH environment variable if it is not necessary.

  • Prepend /usr/local/parasoft/lib.aix4/lib_c<OS revision level>/lib_cSM (or whatever directory corresponds to the correct combination of options from the above table) to your LIBPATH environment variable so that the instrumented program will run.

    NOTE: Since all programs (including standard system utilities, e.g. /bin/ls), executed from this shell will use Insure++'s libc.a, we suggest that you only run Insure++ instrumented programs from that shell (window).

    If you run commands like ls from this shell, you may see error messages similar to the one below.

    	-> ls
    
    	### Symbol reader error: START CODE unknown.  Is this program stripped?
    
    	### You can work around this by setting "symbol_table off".
    	### Or please contact ParaSoft Technical Support at (818) 305-0041
    
    NOTE: If your Insure++ instrumented program calls fork(), exec(), system() or popen(), and uses output from subprocesses, that output will likely not match the expected output.

Keywords: AIX - undefined symbols - dynamic linking


For more information . call (888) 305-0041, fax (626)305-9048, or email quality@parasoft.com

Tools to debug c++ and java
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft