/* Notification to GDB.
- Copyright (C) 1989-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "ptid.h"
-#include "server.h"
+#ifndef GDBSERVER_NOTIF_H
+#define GDBSERVER_NOTIF_H
+
#include "target.h"
-#include "queue.h"
+#include <list>
/* Structure holding information related to a single event. We
keep a queue of these to push to GDB. It can be extended if
the event of given notification contains more information. */
-typedef struct notif_event
+struct notif_event
{
- /* C requires that a struct or union has at least one member. */
- char dummy;
-} *notif_event_p;
+ virtual ~notif_event ()
+ {
+ }
-DECLARE_QUEUE_P (notif_event_p);
+ /* No payload needed. */
+};
/* A type notification to GDB. An object of 'struct notif_server'
represents a type of notification. */
/* A queue of events to GDB. A new notif_event can be enque'ed
into QUEUE at any appropriate time, and the notif_reply is
deque'ed only when the ack from GDB arrives. */
- QUEUE (notif_event_p) *queue;
+ std::list<notif_event *> queue;
/* Write event EVENT to OWN_BUF. */
void (*write) (struct notif_event *event, char *own_buf);
void notif_event_enque (struct notif_server *notif,
struct notif_event *event);
-void initialize_notif (void);
+#endif /* GDBSERVER_NOTIF_H */