diff options
author | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-07-05 17:58:44 +0000 |
---|---|---|
committer | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-07-05 17:58:44 +0000 |
commit | 898586e8e8dcfa495ccf88fce9d8a3fe4d3a7625 (patch) | |
tree | 1472a0286b800398c881dd858557d7b60aa942e2 /gdb/event-loop.c | |
parent | 22c86e7f4ad1b5d1172d47119f49a8dbba35f08d (diff) | |
download | gdb-898586e8e8dcfa495ccf88fce9d8a3fe4d3a7625.tar.gz |
import gdb-1999-07-05 snapshot
Diffstat (limited to 'gdb/event-loop.c')
-rw-r--r-- | gdb/event-loop.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 1e22e06c0fe..3f15da57594 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -290,6 +290,7 @@ gdb_do_one_event () } return result; } + /* Start up the event loop. This is the entry point to the event loop from the command loop. */ @@ -752,26 +753,27 @@ invoke_async_signal_handler () Free the space allocated for it. */ void delete_async_signal_handler (async_handler_ptr) - async_signal_handler *async_handler_ptr; + async_signal_handler **async_handler_ptr; { async_signal_handler *prev_ptr; - if (sighandler_list.first_handler == async_handler_ptr) + if (sighandler_list.first_handler == (*async_handler_ptr)) { - sighandler_list.first_handler = async_handler_ptr->next_handler; + sighandler_list.first_handler = (*async_handler_ptr)->next_handler; if (sighandler_list.first_handler == NULL) sighandler_list.last_handler = NULL; } else { prev_ptr = sighandler_list.first_handler; - while (prev_ptr->next_handler != async_handler_ptr) + while (prev_ptr->next_handler != (*async_handler_ptr) && prev_ptr) prev_ptr = prev_ptr->next_handler; - prev_ptr->next_handler = async_handler_ptr->next_handler; - if (sighandler_list.last_handler == async_handler_ptr) + prev_ptr->next_handler = (*async_handler_ptr)->next_handler; + if (sighandler_list.last_handler == (*async_handler_ptr)) sighandler_list.last_handler = prev_ptr; } - free ((char *) async_handler_ptr); + free ((char *) (*async_handler_ptr)); + (*async_handler_ptr) = NULL; } /* Is it necessary to call invoke_async_signal_handler? */ |