GDB (xrefs)

Classes | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/observer.c File Reference
`#include "defs.h"`
`#include "observer.h"`
`#include "command.h"`
`#include "gdbcmd.h"`
`#include "observer.inc"`

Go to the source code of this file.

## Classes
struct | observer
struct | observer_list

## Typedefs
typedef void() | generic_observer_notification_ftype(const void *data, const void *args)

## Functions
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)
static void | xfree_observer_list_node (struct observer_list *node)
static struct observer * | generic_observer_attach (struct observer_list **subject, generic_observer_notification_ftype *notify, void *data)
static void | generic_observer_detach (struct observer_list **subject, const struct observer *observer)
static void | generic_observer_notify (struct observer_list *subject, const void *args)
void | observer_test_first_notification_function (int arg)
void | observer_test_second_notification_function (int arg)
void | observer_test_third_notification_function (int arg)
void | _initialize_observer (void)

## Variables
static unsigned int | observer_debug
int | observer_test_first_observer = 0
int | observer_test_second_observer = 0
int | observer_test_third_observer = 0

## Typedef Documentation

## ◆ generic_observer_notification_ftype

typedef void() generic_observer_notification_ftype(const void *data, const void *args)

Definition at line 67 of file observer.c.

## Function Documentation

## ◆ _initialize_observer()

void _initialize_observer | ( | void |  | ) |

Definition at line 203 of file observer.c.

References _, add_setshow_zuinteger_cmd(), class_maintenance, observer_debug, setdebuglist, show_observer_debug(), and showdebuglist.

## ◆ generic_observer_attach()

static struct observer* generic_observer_attach | ( | struct observer_list ** | subject,
|  | generic_observer_notification_ftype * | notify,
|  | void * | data
| ) |  |
| static

Definition at line 113 of file observer.c.

References observer::data, observer_list::next, observer::notify, notify, observer_list::observer, and xalloc_observer_list_node().

## ◆ generic_observer_detach()

static void generic_observer_detach | ( | struct observer_list ** | subject,
|  | const struct observer * | observer
| ) |  |
| static

Definition at line 131 of file observer.c.

References _, observer_list::next, observer_list::observer, warning(), and xfree_observer_list_node().

## ◆ generic_observer_notify()

static void generic_observer_notify | ( | struct observer_list * | subject,
|  | const void * | args
| ) |  |
| static

Definition at line 161 of file observer.c.

References observer::data, observer_list::next, observer::notify, and observer_list::observer.

## ◆ observer_test_first_notification_function()

void observer_test_first_notification_function | ( | int | arg | ) |

Definition at line 185 of file observer.c.

References observer_test_first_observer.

## ◆ observer_test_second_notification_function()

void observer_test_second_notification_function | ( | int | arg | ) |

Definition at line 191 of file observer.c.

References observer_test_second_observer.

## ◆ observer_test_third_notification_function()

void observer_test_third_notification_function | ( | int | arg | ) |

Definition at line 197 of file observer.c.

References observer_test_third_observer.

## ◆ show_observer_debug()

static void show_observer_debug | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 59 of file observer.c.

References _, and fprintf_filtered().

Referenced by _initialize_observer().

## ◆ xalloc_observer_list_node()

static struct observer_list* xalloc_observer_list_node | ( | void |  | ) |
| static

Definition at line 90 of file observer.c.

References observer_list::observer, and XNEW.

Referenced by generic_observer_attach().

## ◆ xfree_observer_list_node()

static void xfree_observer_list_node | ( | struct observer_list * | node | ) |
| static

Definition at line 102 of file observer.c.

References observer_list::observer, and xfree().

Referenced by generic_observer_detach().

## Variable Documentation

## ◆ observer_debug

unsigned int observer_debug
| static

Definition at line 57 of file observer.c.

Referenced by _initialize_observer().

## ◆ observer_test_first_observer

int observer_test_first_observer = 0

Definition at line 180 of file observer.c.

Referenced by observer_test_first_notification_function().

## ◆ observer_test_second_observer

int observer_test_second_observer = 0

Definition at line 181 of file observer.c.

Referenced by observer_test_second_notification_function().

## ◆ observer_test_third_observer

int observer_test_third_observer = 0

Definition at line 182 of file observer.c.

Referenced by observer_test_third_notification_function().