diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-12-01 13:09:56 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-12-03 08:31:05 -0500 |
commit | 7509b82979550970342a4494d727b3fb06bffd65 (patch) | |
tree | dcb494b490c750bc3ea370ed875b1b59ddbcd28d /gdb/rs6000-aix-nat.c | |
parent | 857dfb92de66c1ce66e78ae40a4b7d0e8fdbf2f0 (diff) | |
download | gdb-7509b82979550970342a4494d727b3fb06bffd65.zip gdb-7509b82979550970342a4494d727b3fb06bffd65.tar.gz gdb-7509b82979550970342a4494d727b3fb06bffd65.tar.bz2 |
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
Diffstat (limited to 'gdb/rs6000-aix-nat.c')
-rw-r--r-- | gdb/rs6000-aix-nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rs6000-aix-nat.c b/gdb/rs6000-aix-nat.c index 72e59e5..d74211f 100644 --- a/gdb/rs6000-aix-nat.c +++ b/gdb/rs6000-aix-nat.c @@ -539,7 +539,7 @@ rs6000_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, ourstatus->set_spurious (); /* A normal waitstatus. Let the usual macros deal with it. */ else - store_waitstatus (ourstatus, status); + *ourstatus = host_status_to_waitstatus (status); return ptid_t (pid); } |