#include "continuations.h"
#include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h"
+#include "maint.h"
/* readline include files. */
#include "readline/readline.h"
}
/* Initialize all the necessary variables, start the event loop,
- register readline, and stdin, start the loop. */
+ register readline, and stdin, start the loop. The DATA is the
+ interpreter data cookie, ignored for now. */
+
void
-cli_command_loop (void)
+cli_command_loop (void *data)
{
display_gdb_prompt (0);
rl_callback_handler_remove(), does the job. */
rl_callback_handler_remove ();
+ do_cleanups (old_chain);
return;
}
else
*p = 0;
/* Add line to history if appropriate. */
- if (instream == stdin
- && ISATTY (stdin) && *linebuffer)
+ if (*linebuffer && input_from_terminal_p ())
add_history (linebuffer);
/* Note: lines consisting solely of comments are added to the command
TRY_CATCH (exception, RETURN_MASK_ALL)
{
- pop_all_targets (1);
+ pop_all_targets ();
}
signal (SIGHUP, SIG_DFL); /*FIXME: ??????????? */
time. */
if (!batch_silent)
gdb_stdout = stdio_fileopen (stdout);
- gdb_stderr = stdio_fileopen (stderr);
+ gdb_stderr = stderr_fileopen ();
gdb_stdlog = gdb_stderr; /* for moment */
gdb_stdtarg = gdb_stderr; /* for moment */
gdb_stdtargerr = gdb_stderr; /* for moment */