aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-child.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/inf-child.c')
-rw-r--r--gdb/inf-child.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 5e821f4..b65bbf3 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -51,18 +51,19 @@ inf_child_target::info () const
return inf_child_target_info;
}
-/* Helper function for child_wait and the derivatives of child_wait.
- HOSTSTATUS is the waitstatus from wait() or the equivalent; store our
- translation of that in OURSTATUS. */
-void
-store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
+/* See inf-child.h. */
+
+target_waitstatus
+host_status_to_waitstatus (int hoststatus)
{
if (WIFEXITED (hoststatus))
- ourstatus->set_exited (WEXITSTATUS (hoststatus));
+ return target_waitstatus ().set_exited (WEXITSTATUS (hoststatus));
else if (!WIFSTOPPED (hoststatus))
- ourstatus->set_signalled (gdb_signal_from_host (WTERMSIG (hoststatus)));
+ return target_waitstatus ().set_signalled
+ (gdb_signal_from_host (WTERMSIG (hoststatus)));
else
- ourstatus->set_stopped (gdb_signal_from_host (WSTOPSIG (hoststatus)));
+ return target_waitstatus ().set_stopped
+ (gdb_signal_from_host (WSTOPSIG (hoststatus)));
}
inf_child_target::~inf_child_target ()