aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 5d4640b..86607d3 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -40,6 +40,8 @@
#include "interps.h"
#include "main.h"
+#include "source.h"
+
/* If nonzero, display time usage both at startup and for each command. */
int display_time;
@@ -359,6 +361,12 @@ captured_main (void *data)
get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
+#ifdef RELOC_SRCDIR
+ add_substitute_path_rule (RELOC_SRCDIR,
+ make_relative_prefix (argv[0], BINDIR,
+ RELOC_SRCDIR));
+#endif
+
/* There will always be an interpreter. Either the one passed into
this captured main, or one specified by the user at start up, or
the console. Initialize the interpreter to the one requested by