From 7509b82979550970342a4494d727b3fb06bffd65 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 1 Dec 2021 13:09:56 -0500 Subject: gdb: change store_waitstatus to return a target_waitstatus by value store_waitstatus is basically a translation function between a status integer and an equivalent target_waitstatus object. It would make sense for it to take the integer as a parameter and return the target_waitstatus by value. Do that, and rename to host_status_to_waitstatus. Users can then do: ws = host_status_to_waitstatus (status) which does the right thing, given the move constructor of target_waitstatus. Change-Id: I7a07d59d3dc19d3ed66929642f82f44f3e85d61b --- gdb/netbsd-nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/netbsd-nat.c') diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c index e06c036..7dfc586 100644 --- a/gdb/netbsd-nat.c +++ b/gdb/netbsd-nat.c @@ -560,7 +560,7 @@ nbsd_wait (ptid_t ptid, struct target_waitstatus *ourstatus, if (pid == -1) perror_with_name (_("Child process unexpectedly missing")); - store_waitstatus (ourstatus, status); + *ourstatus = host_status_to_waitstatus (status); return pid; } -- cgit v1.1