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];
205 event_ptr->
next = NULL;
211 return event_ptr->
id;
226 if (event_ptr->
id ==
id)
228 *p = event_ptr->
next;
248 if (event_ptr != NULL)
284 if (file_ptr->
fd == fd)
289 if (file_ptr == NULL)
318 file_ptr->
mask = mask;
344 if (file_ptr->
fd == fd)
347 if (file_ptr == NULL)
404 for (file_ptr =
gdb_notifier.first_file_handler; file_ptr != NULL;
407 if (file_ptr->
fd == event_file_desc)
414 warning (
"Exception condition detected on fd %s",
451 file_event_ptr->
fd = fd;
453 return file_event_ptr;
501 file_ptr != NULL && num_found > 0;
void delete_callback_event(int id)
void start_event_loop(void)
int() callback_handler_func(gdb_client_data)
static void xfree(T *ptr)
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)
void warning(const char *fmt,...)
#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)
int() handler_func(int, gdb_client_data)
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)