aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2003-02-13 18:07:24 +0000
committerKeith Seitz <keiths@redhat.com>2003-02-13 18:07:24 +0000
commite46e5ccdd092ca2d34b2611fc66853498e9ebcfe (patch)
treecbc7726bb65b37d242881034f0dc05e7b2476384
parent53954f5e85300a6ec1e14300df955e0cd8bd757f (diff)
downloadfsf-binutils-gdb-e46e5ccdd092ca2d34b2611fc66853498e9ebcfe.zip
fsf-binutils-gdb-e46e5ccdd092ca2d34b2611fc66853498e9ebcfe.tar.gz
fsf-binutils-gdb-e46e5ccdd092ca2d34b2611fc66853498e9ebcfe.tar.bz2
* main.h (struct captured_main_args): Add interpreter_p.
* main.c (captured_main): Initialize interpreter_p from context. * gdb.c (main): Set interpreter_p argument. * Makefile.in (gdb.o): Add dependency for interps.h.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/gdb.c2
-rw-r--r--gdb/main.c8
-rw-r--r--gdb/main.h1
5 files changed, 15 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 681a3b4..6d39a74 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-13 Keith R Seitz <keiths@redhat.com>
+
+ * main.h (struct captured_main_args): Add interpreter_p.
+ * main.c (captured_main): Initialize interpreter_p from context.
+ * gdb.c (main): Set interpreter_p argument.
+ * Makefile.in (gdb.o): Add dependency for interps.h.
+
2003-02-12 Andrew Cagney <ac131313@redhat.com>
* event-top.c (cli_command_loop): Delete declaration.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index f4dd665..4783d13 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1682,7 +1682,7 @@ frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
$(elf_bfd_h) $(symfile_h) $(objfiles_h)
-gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h)
+gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h)
gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
diff --git a/gdb/gdb.c b/gdb/gdb.c
index c0bc487..b6eae2b 100644
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "main.h"
#include "gdb_string.h"
+#include "interps.h"
int
main (int argc, char **argv)
@@ -30,5 +31,6 @@ main (int argc, char **argv)
args.argc = argc;
args.argv = argv;
args.use_windows = 0;
+ args.interpreter_p = INTERP_CONSOLE;
return gdb_main (&args);
}
diff --git a/gdb/main.c b/gdb/main.c
index b10277b..656e7d5 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -229,10 +229,10 @@ captured_main (void *data)
#endif
/* There will always be an interpreter. Either the one passed into
- this captured main (not yet implemented), or one specified by the
- user at start up, or the console. Make life easier by always
- initializing the interpreter to something. */
- interpreter_p = xstrdup (INTERP_CONSOLE);
+ this captured main, or one specified by the user at start up, or
+ the console. Initialize the interpreter to the one requested by
+ the application. */
+ interpreter_p = xstrdup (context->interpreter_p);
/* Parse arguments and options. */
{
diff --git a/gdb/main.h b/gdb/main.h
index 8ee189e..1c91d07 100644
--- a/gdb/main.h
+++ b/gdb/main.h
@@ -27,6 +27,7 @@ struct captured_main_args
int argc;
char **argv;
int use_windows;
+ const char *interpreter_p;
};
extern int gdb_main (struct captured_main_args *);