Gdb source path

How to force gdb to use a different directory to search for source files.

For example, the source file at compile time was in the directory:

/home/foo/bar.c 

Then I moved it to the directory:

 /tmp/debug/home/foo/bar.c 

How to provide gdb for searching in this directory? According to this site , I should just use the command:

 dir /tmp/debug/ 

But it does not work. I get the message foo.c: "No such file or directory" from gdb.

+6
source share
1 answer

Source: https://habr.com/ru/post/969852/


All Articles