Hi Jiafu, > I did some research, and could not find an answer. Is this possible in gcc? > Any help will be greatly appreciated. I don't know if it is an available feature of GCC. If it is not an available feature of GCC, it is "possible"... in that you have GCC source code at your disposal and you could make a one-off GCC which incorporates that feature. I presume that's more than you'd want to tackle (it would be more than I'd want to tackle). However... Read gdb documentation section 7.5: http://sourceware.org/gdb/current/onlinedocs/gdb_8.html What you probably should do is configure gdb with multiple dir commands to specify the locations of all your source directories. To make debugging easier, you could put all those dir commands in your .gdbinit in your executable's directory, or ~/.gdbinit file, depending on how/where you prefer to run gdb. HTH, --Eljay