GDB Files">

GDB Files

Posted by Beetle B. on Thu 30 January 2020

To change the program you want to debug, type file FILENAME. It will look at $PATH if it doesn’t find it.

You can also load .o files (but cannot run them). This is for inspection and disassembly.

Similarly, you can load an executable without the symbol table, and vice versa.

You can load core dump files.

Type info files to get information about the current target.

To see all shared libraries that are loaded, do info share REGEX. If you omit the REGEX, it will show all loaded libraries.

To load a shared library, do share REGEX. It will only load the ones requires by your program/core file.

nosharedlibrary unloads all shared object library symbols.

Some information on remote debugging.

Debugging Information in Separate Files

GDB allows you to put a program’s debugging information in a file separate from the executable itself, in a way that allows GDB to find and load the debugging information automatically.

This section has information on handling executables whose debug info is in separate files.

Index Files

When GDB finds a symbol file, it scans the symbols in the file in order to construct an internal symbol table. This lets most GDB operations work quickly–at the cost of a delay early on. For large programs, this delay can be quite lengthy, so GDB provides a way to build an index, which speeds up startup.

tags : gdb