diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-12-11 01:25:19 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-12-11 01:25:19 +0000 |
commit | 0a6ba0e204f2d0a29d40c686a8c4e5c85e9fefa0 (patch) | |
tree | 7ffc418a6cd320a1145eac8c446b83f53aa3c97a /gdb/infrun.c | |
parent | 078ef10707b31d05731117884b91502230fc2f2a (diff) | |
download | gdb-0a6ba0e204f2d0a29d40c686a8c4e5c85e9fefa0.tar.gz |
* hppah-nat.c (child_wait): Return TARGET_WAITKIND_IGNORE
for the parent's fork event.
* infrun.c (handle_inferior_event): Only expect one fork event.
Call prepare_to_wait for TARGET_WAITKIND_IGNORE. Update comment.
* target.h: Update comment for TARGET_WAITKIND_IGNORE.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 76770cc5c10..7cb9f3338ea 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1478,24 +1478,9 @@ handle_inferior_event (struct execution_control_state *ecs) stop_signal = TARGET_SIGNAL_TRAP; pending_follow.kind = ecs->ws.kind; - /* Ignore fork events reported for the parent; we're only - interested in reacting to forks of the child. Note that - we expect the child's fork event to be available if we - waited for it now. */ - if (ptid_equal (inferior_ptid, ecs->ptid)) - { - pending_follow.fork_event.saw_parent_fork = 1; - pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid); - pending_follow.fork_event.child_pid = ecs->ws.value.related_pid; - prepare_to_wait (ecs); - return; - } - else - { - pending_follow.fork_event.saw_child_fork = 1; - pending_follow.fork_event.child_pid = PIDGET (ecs->ptid); - pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid; - } + pending_follow.fork_event.saw_child_fork = 1; + pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid); + pending_follow.fork_event.child_pid = ecs->ws.value.related_pid; stop_pc = read_pc_pid (ecs->ptid); ecs->saved_inferior_ptid = inferior_ptid; @@ -1703,13 +1688,15 @@ handle_inferior_event (struct execution_control_state *ecs) /* We had an event in the inferior, but we are not interested in handling it at this level. The lower layers have already - done what needs to be done, if anything. This case can - occur only when the target is async or extended-async. One - of the circumstamces for this to happen is when the - inferior produces output for the console. The inferior has - not stopped, and we are ignoring the event. */ + done what needs to be done, if anything. + + One of the possible circumstances for this is when the + inferior produces output for the console. The inferior has + not stopped, and we are ignoring the event. Another possible + circumstance is any event which the lower level knows will be + reported multiple times without an intervening resume. */ case TARGET_WAITKIND_IGNORE: - ecs->wait_some_more = 1; + prepare_to_wait (ecs); return; } |