info files, info target | info files and info target are |
| synonymous; both commands print the current |
| target (see Chapter 13 (page 133)), including the |
| names of the executable and core dump files |
| currently in use by GDB, and the files from which |
| symbols were loaded. Both the commands list |
| all possible targets rather than the current targets. |
All
GDB automatically loads symbol definitions from shared libraries when you use the run command, or when you examine a core file. (Before you issue the run command, GDB does not understand references to a function in a shared library, however ― unless you are debugging a core file).
On
info share, info | Print the names of the shared libraries which are |
sharedlibrary | currently loaded. |
sharedlibrary regex, share Load shared object library symbols for files matching a
regex | Unix regular expression. As with files loaded |
| automatically, it only loads shared libraries required by |
| your program for a core file or after typing run. If regex |
| is omitted all shared libraries required by your program |
| are loaded. |
On
Beyond that threshold, symbols from shared libraries must be explicitly loaded. To load these symbols, use the command sharedlibrary filename. The base address of the shared library is determined automatically by GDB and need not be specified.
To display or set the threshold, use the commands:
set | Set the autoloading size threshold, in megabytes. |
threshold | If threshold is nonzero, symbols from all |
| shared object libraries will be loaded |
| automatically when the inferior begins execution |
| or when the dynamic linker informs GDB that a |
| new library has been loaded, until the symbol |
| table of the program and libraries exceeds this |
| threshold. Otherwise, symbols must be loaded |
| manually, using the sharedlibrary command. |
| The default threshold is 100 megabytes. |
12.1 Commands to specify files 129