39 #define GDB_READABLE (1<<1)
40 #define GDB_WRITABLE (1<<2)
41 #define GDB_EXCEPTION (1<<3)
109 fd_set check_masks[3];
112 fd_set ready_masks[3];
202 event_ptr =
xmalloc (
sizeof (*event_ptr));
206 event_ptr->
next = NULL;
212 return event_ptr->
id;
227 if (event_ptr->
id ==
id)
229 *p = event_ptr->
next;
249 if (event_ptr != NULL)
285 if (file_ptr->
fd == fd)
290 if (file_ptr == NULL)
292 file_ptr =
xmalloc (
sizeof (*file_ptr));
319 file_ptr->
mask = mask;
345 if (file_ptr->
fd == fd)
348 if (file_ptr == NULL)
405 for (file_ptr =
gdb_notifier.first_file_handler; file_ptr != NULL;
408 if (file_ptr->
fd == event_file_desc)
415 fprintf (stderr,
"Exception condition detected on fd %s\n",
452 file_event_ptr->
fd = fd;
453 return file_event_ptr;
501 file_ptr != NULL && num_found > 0;
void delete_callback_event(int id)
int( handler_func)(int, gdb_client_data)
void start_event_loop(void)
char * pfildes(gdb_fildes_t fd)
static void create_file_handler(gdb_fildes_t fd, int mask, handler_func *proc, gdb_client_data client_data)
#define QUEUE_enque(TYPE, Q, V)
#define QUEUE_is_empty(TYPE, Q)
static int wait_for_event(void)
static QUEUE(gdb_event_p)
struct file_handler * next_file
DECLARE_QUEUE_P(gdb_event_p)
void initialize_event_loop(void)
static int process_callback(void)
callback_handler_func * proc
void delete_file_handler(gdb_fildes_t fd)
DEFINE_QUEUE_P(notif_event_p)
struct callback_event * last
struct gdb_event * gdb_event_p
event_handler_func * proc
#define QUEUE_deque(TYPE, Q)
static int handle_file_event(gdb_fildes_t event_file_desc)
struct file_handler file_handler
static void gdb_event_xfree(struct gdb_event *event)
int append_callback_event(callback_handler_func *proc, gdb_client_data data)
#define QUEUE_alloc(TYPE, FREE_FUNC)
void add_file_handler(gdb_fildes_t fd, handler_func *proc, gdb_client_data client_data)
gdb_client_data client_data
static struct @0 callback_list
void perror_with_name(const char *string)
struct callback_event * first
struct callback_event * next
int( event_handler_func)(gdb_fildes_t)
static int process_event(void)
static gdb_event * create_file_event(gdb_fildes_t fd)
int( callback_handler_func)(gdb_client_data)