/* Top level stuff for GDB, the GNU debugger.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
#include "cli/cli-script.h" /* for reset_command_nest_depth */
#include "main.h"
#include "gdbthread.h"
-#include "observer.h"
+#include "observable.h"
#include "continuations.h"
#include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h"
/* Give observers a chance of changing the prompt. E.g., the python
`gdb.prompt_hook' is installed as an observer. */
- observer_notify_before_prompt (get_prompt ());
+ gdb::observers::before_prompt.notify (get_prompt ());
prompt = get_prompt ();
a whole command. */
void
-command_handler (char *command)
+command_handler (const char *command)
{
struct ui *ui = current_ui;
- char *c;
+ const char *c;
if (ui->instream == ui->stdin_stream)
reinitialize_more_filter ();
}
#define SERVER_COMMAND_PREFIX "server "
- if (startswith (cmd, SERVER_COMMAND_PREFIX))
+ server_command = startswith (cmd, SERVER_COMMAND_PREFIX);
+ if (server_command)
{
/* Note that we don't set `saved_command_line'. Between this
and the check in dont_repeat, this insures that repeating
hung up but GDB is still alive. In such a case, we just quit
gdb killing the inferior program too. */
printf_unfiltered ("quit\n");
- execute_command ((char *) "quit", 1);
+ execute_command ("quit", 1);
}
else if (cmd == NULL)
{