I've created new patch where I've added new option called skip-compile-dir. Patch in attachment. I didn't make ChangeLog yet. If you like this implementation I prepare ChangeLog and testsuite script. I can change something if you want. Here is example: $ gcc -g -Wall /home/eldar/testdir/test.c $ ./contrib/gdb-7.2/gdb/gdb ./a.out ... (gdb) b main ... (gdb) r ... (gdb) backtrace #0 main () at /home/eldar/testdir/test.c:4 ... (gdb) set backtrace List of set backtrace subcommands: ... set backtrace skip-compile-dir -- Set whether compile path should be skipped in backtraces ... (gdb) set backtrace skip-compile-dir on (gdb) backtrace #0 main () at testdir/test.c:4 (gdb) show backtrace ... skip-compile-dir: Whether compile path should be skipped in backtraces is on. (gdb) show backtrace skip-compile-dir Whether compile path should be skipped in backtraces is on.