#include "value.h"
#include "language.h"
#include "terminal.h"
-#include "common/job-control.h"
+#include "gdbsupport/job-control.h"
#include "annotate.h"
#include "completer.h"
#include "top.h"
-#include "common/version.h"
+#include "gdbsupport/version.h"
#include "serial.h"
#include "main.h"
#include "event-loop.h"
#include "maint.h"
#include "filenames.h"
#include "frame.h"
-#include "common/buffer.h"
+#include "gdbsupport/buffer.h"
#include "gdb_select.h"
-#include "common/scope-exit.h"
+#include "gdbsupport/scope-exit.h"
+#include "gdbarch.h"
/* readline include files. */
#include "readline/readline.h"
gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdlog)
gen_ret_current_ui_field_ptr (struct ui_out *, current_uiout)
-/* Initialization file name for gdb. This is host-dependent. */
-
-const char gdbinit[] = GDBINIT;
-
int inhibit_gdbinit = 0;
extern char lang_frame_mismatch_warn[]; /* language.c */
static void
new_ui_command (const char *args, int from_tty)
{
- gdb_file_up stream[3];
- int i;
int argc;
const char *interpreter_name;
const char *tty_name;
{
scoped_restore save_ui = make_scoped_restore (¤t_ui);
- /* Open specified terminal, once for each of
- stdin/stdout/stderr. */
- for (i = 0; i < 3; i++)
- stream[i] = open_terminal_stream (tty_name);
+ /* Open specified terminal. Note: we used to open it three times,
+ once for each of stdin/stdout/stderr, but that does not work
+ with Windows named pipes. */
+ gdb_file_up stream = open_terminal_stream (tty_name);
std::unique_ptr<ui> ui
- (new struct ui (stream[0].get (), stream[1].get (), stream[2].get ()));
+ (new struct ui (stream.get (), stream.get (), stream.get ()));
ui->async = 1;
interp_pre_command_loop (top_level_interpreter ());
- /* Make sure the files are not closed. */
- stream[0].release ();
- stream[1].release ();
- stream[2].release ();
+ /* Make sure the file is not closed. */
+ stream.release ();
ui.release ();
}
--without-intel-pt\n\
"));
#endif
-#if HAVE_LIBMCHECK
- fprintf_filtered (stream, _("\
- --enable-libmcheck\n\
-"));
-#else
- fprintf_filtered (stream, _("\
- --disable-libmcheck\n\
-"));
-#endif
#if HAVE_LIBMPFR
fprintf_filtered (stream, _("\
--with-mpfr\n\
initialize_progspace ();
initialize_inferiors ();
initialize_current_architecture ();
- init_cli_cmds();
init_main (); /* But that omits this file! Do it now. */
initialize_stdin_serial ();