Debugging Dynamically Loaded Libraries
TotalView automatically reads the symbols of shared libraries that are dynamically loaded into your program at runtime. These libraries are ones that are loaded using dlopen (or, on IBM AIX, load and loadbind).
TotalView automatically detects these calls, and then loads the symbol table from the newly loaded libraries and plants any enabled saved breakpoints for these libraries. TotalView then decides whether to ask you about stopping the process to plant breakpoints. You will set these characteristics by using the Dynamic Libraries Page within the File > Preferences dialog box.
File > Preferences Dialog Box: Dynamic Libraries Page 
|
TotalView decides according to the following rules:
- If the "Load symbols from dynamic libraries preference is set to false, TotalView does not ask you about stopping.
- If one or more of the strings in the "When the file suffix matches preference list is a suffix of the full library name (including path), TotalView asks you about stopping.
- If one or more of the strings in the "When the file path prefix does not match list is a prefix of the full library name (including path), TotalView does not ask you about stopping.
- If the newly loaded libraries have any saved breakpoints, TotalView does not ask you about stopping.
- If none of the rules above apply, TotalView asks you about stopping.
If TotalView does not ask you about stopping the process, the process is continued.
If TotalView decides to ask you about stopping, it displays a dialog box, asking if it should stop the process so you can set breakpoints. To stop the process, answer yes.
Stop Process Question 
|
To allow the process to continue executing, answer no. Stopping the process allows you to insert breakpoints in the newly loaded shared library.
You can tell TotalView if it should ask by doing either or both of the following:
- You can set the -ask_on_dlopen command-line option to true, or you can set the -no_ask_on_dlopen option to false.
- Set the Load Symbols from dynamic libraries preference.
The following table lists paths where you are not asked if it is alright to load dynamic link libraries:
Platform |
Value |
Compaq Tru64 UNIX Alpha |
/usr/shlib/ /usr/ccs/lib/ /usr/lib/cmplrs/cc/ /usr/lib/ /usr/local/lib/ /var/shlib/ |
HP-UX |
/usr/lib/ /usr/lib/pa20_64 /opt/langtools/lib/ /opt/langtools/lib/pa20_64/ |
IBM AIX |
/lib/ /usr/lib/ /usr/lpp/ /usr/ccs/lib/ /usr/dt/lib/ /tmp/ |
SGI IRIX |
/lib/ /usr/lib/ /usr/local/lib/ /lib32/ /usr/lib32/ /usr/local/lib32/ /lib64/ /usr/lib64/ /usr/local/lib64 |
SUN Solaris 2.x |
/lib/ /usr/lib/ /usr/ccs/lib/ |
Linux x86 |
/lib /usr/lib |
Linux Alpha |
/lib /usr/lib |
The values you enter om the TotalView preference should be space-separated lists of the prefixes and suffixes to be used.
After starting TotalView, you can change these lists by using the When the file suffix matches and And the file path prefix does not match preferences.