/* GDB Notifications to Observers.
- Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of GDB.
#include "command.h"
#include "gdbcmd.h"
-static int observer_debug;
+static unsigned int observer_debug;
static void
show_observer_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
static struct observer_list *
xalloc_observer_list_node (void)
{
- struct observer_list *node = XMALLOC (struct observer_list);
+ struct observer_list *node = XNEW (struct observer_list);
- node->observer = XMALLOC (struct observer);
+ node->observer = XNEW (struct observer);
return node;
}
int observer_test_second_observer = 0;
int observer_test_third_observer = 0;
-/* Provide prototypes to silence -Wmissing-prototypes. */
-extern void observer_test_first_notification_function (int arg);
-extern void observer_test_second_notification_function (int arg);
-extern void observer_test_third_notification_function (int arg);
-
void
observer_test_first_notification_function (int arg)
{
observer_test_third_observer++;
}
-extern initialize_file_ftype _initialize_observer; /* -Wmissing-prototypes */
-
void
_initialize_observer (void)
{
- add_setshow_zinteger_cmd ("observer", class_maintenance,
- &observer_debug, _("\
+ add_setshow_zuinteger_cmd ("observer", class_maintenance,
+ &observer_debug, _("\
Set observer debugging."), _("\
Show observer debugging."), _("\
When non-zero, observer debugging is enabled."),
- NULL,
- show_observer_debug,
- &setdebuglist, &showdebuglist);
+ NULL,
+ show_observer_debug,
+ &setdebuglist, &showdebuglist);
}
#include "observer.inc"