[2/9] fbsd-nat: Avoid a direct write to target_waitstatus::kind.
Commit Message
This is in #ifdef'd code for a workaround for FreeBSD versions older
than 11.1 which is why it wasn't caught earlier.
---
gdb/fbsd-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2/28/23 13:18, John Baldwin wrote:
> This is in #ifdef'd code for a workaround for FreeBSD versions older
> than 11.1 which is why it wasn't caught earlier.
> ---
> gdb/fbsd-nat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> --
> 2.38.1
>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
I think this could also be considered obvious, and you are the
maintainer of this fail anyway, so it's fine to just push fixes that are
likely not controversial.
Simon
@@ -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