aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-10-22 00:13:43 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-10-22 00:13:43 -0400
commit66cc044255f805fd052b9cb9352915cbdf3040b5 (patch)
tree400c9f40bbd77f2c0b3a476e9edd666b2c971003 /gdb
parent46276d3ca2ed4b415d4a0da54e5aeffc53eb6489 (diff)
downloadgdb-66cc044255f805fd052b9cb9352915cbdf3040b5.zip
gdb-66cc044255f805fd052b9cb9352915cbdf3040b5.tar.gz
gdb-66cc044255f805fd052b9cb9352915cbdf3040b5.tar.bz2
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
Diffstat (limited to 'gdb')
-rw-r--r--gdb/remote-sim.c9
1 files changed, 3 insertions, 6 deletions
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: