/* Top level stuff for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
- 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1986-2005, 2007-2012 Free Software Foundation, Inc.
This file is part of GDB.
static int
captured_command_loop (void *data)
{
+ /* Top-level execution commands can be run on the background from
+ here on. */
+ interpreter_async = 1;
+
current_interp_command_loop ();
/* FIXME: cagney/1999-11-05: A correct command_loop() implementaton
would clean things up (restoring the cleanup chain) to the state
int save_auto_load;
struct objfile *objfile;
- struct cleanup *pre_stat_chain = make_command_stats_cleanup (0);
+ struct cleanup *pre_stat_chain;
+
+#ifdef HAVE_SBRK
+ /* Set this before calling make_command_stats_cleanup. */
+ lim_at_start = (char *) sbrk (0);
+#endif
+
+ pre_stat_chain = make_command_stats_cleanup (0);
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
-#ifdef HAVE_SBRK
- lim_at_start = (char *) sbrk (0);
-#endif
-
cmdsize = 1;
cmdarg = (struct cmdarg *) xmalloc (cmdsize * sizeof (*cmdarg));
ncmd = 0;
ndir = 0;
quit_flag = 0;
- line = (char *) xmalloc (linesize);
- line[0] = '\0'; /* Terminate saved (now empty) cmd line. */
+ saved_command_line = (char *) xmalloc (saved_command_line_size);
+ saved_command_line[0] = '\0';
instream = stdin;
gdb_stdout = stdio_fileopen (stdout);