Where Have My Source Files Gone?
- The issue: gdb stores the full path to each source file, in the program's
debug information.
- The problem: when debugging on a different machine then where you
compiled, gdb might not find the source code.
- The solution: telling gdb where the source files are.
- Use 'directory <directory>' to add directors in which gdb searches
for source files.
- Use 'show directories' to see the list of directories in which gdb
searches for source files.
- Use 'directory' with no parameters to reset this list.
Originally written by
guy keren