HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 99 (of 101)
Chapter 11 Software Development
October 29, 2013
There is also a related environment variable called LD_PRELOAD_ONCE. The
LD_PRELOAD_ONCE feature is similar to LD_PRELOAD except that the dynamic loader,
dld.so, unsets LD_PRELOAD_ONCE after reading it, so that any applications invoked by the
current application do not have LD_PRELOAD_ONCE set. This is useful in situations where
the current application needs certain libraries preloaded while the child application is adversely
affected if these are preloaded (for example, ksh terminates abnormally if LD_PRELOAD
contains /usr/lib/hpux[32|64]/libpthread.1).
PTHREAD_THREAD_STACK_SIZE determines the thread stacksize used by the pthread library. It
might be helpful to solve thread stack overflows in applications which need more than the
default thread stacksize (64k on PA-RISC, 256k on Itanium).
gdb Variables
As mentioned in the Debugging chapter, for correct debugging results it is crucial to debug with
the correct shared library versions. Often it is the case that these versions must be copied to the
debugging system where they cannot be installed in their original paths. These libraries can be
copied into some other directory. gdb will pick them if the directory is listed in the variable
GDB_SHLIB_PATH.
For java debugging, putting the correct version of libjunwind.sl into GDB_JAVA_UNWINDLIB
enables gdb to unwind stacks through interpreted and compiled java methods, and other java
related features, which become more and more with newer java and gdb versions.