aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-loop.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-07-05 17:58:44 +0000
committerJason Molenda <jmolenda@apple.com>1999-07-05 17:58:44 +0000
commit43ff13b4182f3853e19e9100c84313a6e9302b70 (patch)
treea546b011131cdb9e4d6200dd1f2b9432ffa01539 /gdb/event-loop.c
parentf11523b01363bac4f0b7384c30fee355e9943b99 (diff)
downloadgdb-43ff13b4182f3853e19e9100c84313a6e9302b70.zip
gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.gz
gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.bz2
import gdb-1999-07-05 snapshot
Diffstat (limited to 'gdb/event-loop.c')
-rw-r--r--gdb/event-loop.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 1e22e06..3f15da5 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? */