[commit] Fix/revert insight build regression by me [Re: [commit] [patch 1/2] Drop gdbtui [+doc changes]]

Jan Kratochvil
2012-01-02T13:32:41Z

On Mon, 02 Jan 2012 14:03:15 +0100, Pedro Alves wrote:
> This breaks 'insight' the binary, which similarly to gdbtui,
> starts gdb with the "insight" interpreter.

./gdbtk/generic/gdbtk-main.c: In function ‘main’:
./gdbtk/generic/gdbtk-main.c:35:7: error: ‘struct captured_main_args’ has no member named ‘interpreter_p’

Thanks for catching it. Checked in the revert below.

Regards,
Jan

http://sourceware.org/ml/gdb-cvs/2012-01/msg00019.html

--- src/gdb/ChangeLog 2012/01/02 09:03:07 1.13688
+++ src/gdb/ChangeLog 2012/01/02 13:29:55 1.13689
@@ -1,3 +1,12 @@
+2012-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Revert this part of:
+ 2012-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Remove the gdbtui binary.
+ * gdb.c (main): Remove args.interpreter_p initialization.
+ * main.c (captured_main): Set INTERPRETER_P directly by INTERP_CONSOLE.
+ * main.h (struct captured_main_args): Remove interpreter_p.
+
2012-01-02 Joel Brobecker <brobecker@adacore.com>

* config/djgpp/fnchange.lst: Add entry for ChangeLog-2011.
--- src/gdb/gdb.c 2012/01/02 02:28:58 1.13
+++ src/gdb/gdb.c 2012/01/02 13:29:57 1.14
@@ -31,5 +31,6 @@
args.argc = argc;
args.argv = argv;
args.use_windows = 0;
+ args.interpreter_p = INTERP_CONSOLE;
return gdb_main (&args);
}
--- src/gdb/main.c 2012/01/02 02:28:58 1.98
+++ src/gdb/main.c 2012/01/02 13:29:57 1.99
@@ -380,7 +380,7 @@
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 (INTERP_CONSOLE);
+ interpreter_p = xstrdup (context->interpreter_p);

/* Parse arguments and options. */
{
--- src/gdb/main.h 2012/01/02 02:28:58 1.13
+++ src/gdb/main.h 2012/01/02 13:29:57 1.14
@@ -26,6 +26,7 @@
int argc;
char **argv;
int use_windows;
+ const char *interpreter_p;
};

extern int gdb_main (struct captured_main_args *);