/* Remote notification in GDB protocol
- Copyright (C) 1988-2019 Free Software Foundation, Inc.
+ Copyright (C) 1988-2021 Free Software Foundation, Inc.
This file is part of GDB.
#include "remote.h"
#include "remote-notif.h"
#include "observable.h"
-#include "event-loop.h"
+#include "gdbsupport/event-loop.h"
#include "target.h"
#include "inferior.h"
#include "infrun.h"
#include "gdbcmd.h"
+#include "async-event.h"
bool notif_debug = false;
static void
remote_async_get_pending_events_handler (gdb_client_data data)
{
- gdb_assert (target_is_non_stop_p ());
- remote_notif_process ((struct remote_notif_state *) data, NULL);
+ remote_notif_state *notif_state = (remote_notif_state *) data;
+ clear_async_event_handler (notif_state->get_pending_events_token);
+ gdb_assert (remote_target_is_non_stop_p (notif_state->remote));
+ remote_notif_process (notif_state, NULL);
}
/* Remote notification handler. Parse BUF, queue notification and
notif_state->get_pending_events_token
= create_async_event_handler (remote_async_get_pending_events_handler,
- notif_state);
+ notif_state, "remote-notif");
return notif_state;
}
delete pending_event[i];
}
+void _initialize_notif ();
void
-_initialize_notif (void)
+_initialize_notif ()
{
add_setshow_boolean_cmd ("notification", no_class, ¬if_debug,
_("\