aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-12-11 01:25:19 +0000
committerDaniel Jacobowitz <drow@false.org>2002-12-11 01:25:19 +0000
commit8e7d2c16952df15b6628a9f2ee985086a408561f (patch)
treec39b3c5c7dde47826abe888b4e584aabf475d45c /gdb/infrun.c
parent3b01a667ff2681cff92b24fee4def45f643f74ba (diff)
downloadgdb-8e7d2c16952df15b6628a9f2ee985086a408561f.zip
gdb-8e7d2c16952df15b6628a9f2ee985086a408561f.tar.gz
gdb-8e7d2c16952df15b6628a9f2ee985086a408561f.tar.bz2
* 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.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 76770cc..7cb9f33 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;
}