From 66cc044255f805fd052b9cb9352915cbdf3040b5 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 22 Oct 2021 00:13:43 -0400 Subject: 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 --- gdb/remote-sim.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gdb') diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 55d674f..328b4e9 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: -- cgit v1.1