Allow gdb to search source path for required files
When doing out-of-source builds I often end up wanting to use gdb from inside a build directory. Currently if I do that the `.gdbinit` in the ruby source directory is not read. Attempting to manually load the `.gdbinit` from the Ruby source directory errors because of hard coded file-paths that assume we're running gdb from inside the source tree. Adding the `-s` flag to the `source` command when loading relative files signals to gdb to search in the source search path for the required file, rather than just the current directory. This allows me to use a custom `.gdbinit` from my build directory that sets the correct source directory and then loads the Ruby `.gdbinit`. ``` dir ../src source ../src/.gdbinit ```
This commit is contained in:
parent
47322b592a
commit
ad9fe6f376
Loading…
x
Reference in New Issue
Block a user