aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-04-21 10:13:05 +0000
committerJoseph Myers <joseph@codesourcery.com>2009-04-21 10:13:05 +0000
commit29b0e8a24aad93899d3d81d9e43493adfa83c930 (patch)
tree320900356a949dd9b985d39cb6be0c3c0eaab724 /gdb/main.c
parentccabeb57ba166e3c9a5ec72fec715f05e1a93e2a (diff)
downloadgdb-29b0e8a24aad93899d3d81d9e43493adfa83c930.zip
gdb-29b0e8a24aad93899d3d81d9e43493adfa83c930.tar.gz
gdb-29b0e8a24aad93899d3d81d9e43493adfa83c930.tar.bz2
gdb:
* configure.ac (--with-relocated-sources): New. * configure, config.in: Regenerate. * source.c (add_substitute_path_rule): Remove static. * source.h (add_substitute_path_rule): Declare. * main.c: Include "source.h". (captured_main): Add substitution rule if RELOC_SRCDIR. gdb/doc: * gdb.texinfo (Source Path): Document --with-relocated-sources.
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