sim: fully merge sim_state_base into sim_state
[deliverable/binutils-gdb.git] / sim / common / sim-reason.c
index 4647997cbb56c0e9de4e3fabf42d0e673ca56826..73a57654c246d8749780dbcf4e6ab360d240a812 100644 (file)
@@ -1,6 +1,5 @@
 /* Generic simulator stop_reason.
-   Copyright (C) 1997, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2021 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -18,9 +17,14 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include "sim-main.h"
 #include "sim-assert.h"
 
+#include <stdlib.h>
+
 /* Generic implementation of sim_stop_reason */
 
 void
@@ -37,7 +41,7 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
       break;
     case sim_stopped :
     case sim_signalled :
-      *sigrc = sim_signal_to_target (sd, engine->sigrc);
+      *sigrc = sim_signal_to_gdb_signal (sd, engine->sigrc);
       break;
     default :
       abort ();
This page took 0.034017 seconds and 4 git commands to generate.