- Source Path (Debugging with GDB) - sourceware. org
GDB has a list of directories to search for source files; this is called the source path Each time GDB wants a source file, it tries all the directories in the list, in the order they are present in the list, until it finds a file with the desired name
- debugging - GDB source path - Stack Overflow
If I there will be a lot such files, adding the whole path for each file is like putting all the files in one debug directory In other words, if you have files with the same names but different directories (during the compilation time) adding the whole paths will cause name conflicts (gdb will not distinguish between this files)
- Debugging with GDB - Source Path - GNU
GDB has a list of directories to search for source files; this is called the source path Each time GDB wants a source file, it tries all the directories in the list, in the order they are present in the list, until it finds a file with the desired name Note that the executable search path is not used for this purpose
- Linux Debugging with gdb Guide - Specifying source directories
If gdb cannot find a source file in the source path, and the object program records a directory, gdb tries that directory too If the source path is empty, and there is no record of the compilation directory, gdb looks in the current directory as a last resort
- Find the path of the source code for the executable being . . .
21 I can set a breakpoint in main and debug the code with the correct source code, but I don't know where GDB is taking the source code from The source code is not present in CWD (current working directory) How do I find from which location GDB is taking the code?
- Location Specifications (Debugging with GDB) - sourceware. org
Location Specifications (Debugging with GDB)By contrast, location specs you type will many times omit some of these attributes For example, it is customary to specify just the source line number to mean a line in the current source file, or specify just the basename of the file, omitting its directories In other words, a location spec is usually incomplete, a kind of blueprint, and GDB needs
|