Totalview® Reference Guide : PART III Platforms and Operating Systems : Chapter 10 Operating Systems : Debugging Your Program’s Dynamically Loaded Libraries
Debugging Your Program’s Dynamically Loaded Libraries
TotalView automatically reads the symbols of shared libraries that are dynamically loaded into your program at runtime. These libraries are those 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 in the File > Preferences Dialog Box.
 
Figure 13 – File > Preferences Dialog Box: Dynamic Libraries Page
TotalView decides according to the following rules:
1. If either the Load symbols from dynamic libraries or Ask to stop when loading dynamic libraries preference is set to false, TotalView does not ask you about stopping.
2. 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 the path), TotalView asks you about stopping.
3. 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 the path), TotalView does not ask you about stopping.
4. If the newly loaded libraries have any saved breakpoints, TotalView does not ask you about stopping.
5. 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.
 
Figure 14 – Stop Process Question Dialog Box
To allow the process to continue executing, answer No. Stopping the process allows you to insert breakpoints in the newly loaded shared library.
Do either or both of the following to tell TotalView if it should ask:
If you can set the -ask_on_dlopen command-line option to true, or you can set the -no_ask_on_dlopen option to false.
Unset the Load symbols from dynamic libraries preference.
The following table lists paths where you are not asked if TotalView should stop the process:
Platform
Value
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/
SUN Solaris 2.x
/lib/ /usr/lib/
/usr/ccs/lib/
Linux x86
/lib /usr/lib
Linux Alpha
/lib /usr/lib
The values you enter in 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.