From: Simon Marchi Date: Fri, 22 Oct 2021 04:13:43 +0000 (-0400) Subject: gdb: fix remote-sim.c build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66cc044255f805fd052b9cb9352915cbdf3040b5;p=binutils-gdb.git gdb: fix remote-sim.c build Commit 183be222907a ("gdb, gdbserver: make target_waitstatus safe") broke the remote-sim.c build. In fact, it does some wrong changes, result of a bad sed invocation. Fix it by adjusting the code to the new target_waitstatus API. Change-Id: I3236ff7ef7681fc29215f68be210ff4263760e91 --- diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 55d674fc4d3..328b4e91b29 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -980,8 +980,7 @@ gdbsim_target::wait (ptid_t ptid, struct target_waitstatus *status, switch (reason) { case sim_exited: - status->kind = TARGET_WAITKIND_EXITED; - status->value.integer = sigrc; + status->set_exited (sigrc); break; case sim_stopped: switch (sigrc) @@ -992,14 +991,12 @@ gdbsim_target::wait (ptid_t ptid, struct target_waitstatus *status, case GDB_SIGNAL_INT: case GDB_SIGNAL_TRAP: default: - status->kind = TARGET_WAITKIND_STOPPED; - status->sig () = (enum gdb_signal) sigrc; + status->set_stopped ((gdb_signal) sigrc); break; } break; case sim_signalled: - status->kind = TARGET_WAITKIND_SIGNALLED; - status->sig () = (enum gdb_signal) sigrc; + status->set_signalled ((gdb_signal) sigrc); break; case sim_running: case sim_polling: