From: John Baldwin Date: Mon, 27 Mar 2023 19:51:02 +0000 (-0700) Subject: fbsd-nat: Avoid a direct write to target_waitstatus::kind. X-Git-Tag: binutils-2_41~1159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b48c2f04091d33d134b627f1b0a57e2d711cb5a2;p=thirdparty%2Fbinutils-gdb.git fbsd-nat: Avoid a direct write to target_waitstatus::kind. This is in #ifdef'd code for a workaround for FreeBSD versions older than 11.1 which is why it wasn't caught earlier. Approved-By: Simon Marchi --- diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index 4e48bfa1590..2f5b512fb33 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -1261,7 +1261,7 @@ fbsd_nat_target::wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus, wptid = fbsd_next_vfork_done (); if (wptid != null_ptid) { - ourstatus->kind = TARGET_WAITKIND_VFORK_DONE; + ourstatus->set_vfork_done (); return wptid; } #endif