Name

file

file
file filename [-mapped] [-readnow]

The first syntax causes GDB to discard all its information on both the symbol file and the executable file. The second syntax treats filename as the file to be debugged; it is used both for symbol table information and as the program to run for the run command.

The -mapped option causes GDB to write symbol table information into a file named program.syms, from which it can be retrieved for subsequent debugging runs. As long as the program hasn’t changed, this is faster than reading the symbol table from the executable.

The -readnow option forces GDB to load symbol table information immediately instead of waiting until information is needed.

Get GDB Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.