sim: callback: expose argv & environ
[binutils-gdb.git] / sim / frv / reset.c
index 5dfe5098ab0efb329f990e5182063bbd7d0ad481..8b44fab6de60466c72a6e7a60dd2b4779ffcdc69 100644 (file)
@@ -1,6 +1,5 @@
 /* frv simulator support code
-   Copyright (C) 1999-2001, 2003, 2007-2012 Free Software Foundation,
-   Inc.
+   Copyright (C) 1999-2021 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
 This file is part of the GNU simulators.
@@ -18,11 +17,15 @@ 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"
+
 #define WANT_CPU
 #define WANT_CPU_FRVBF
 
 #include "sim-main.h"
 #include "bfd.h"
+#include "cgen-mem.h"
 
 /* Initialize the frv simulator.  */
 void
@@ -106,7 +109,7 @@ frv_term (SIM_DESC sd)
      then turn it off again.  This is the only place we can currently gain
      control to do this.  */
   if (frv_interrupt_state.timer.enabled && ! frv_save_profile_model_p)
-    sim_profile_set_option (current_state, "-model", PROFILE_MODEL_IDX, "0");
+    sim_profile_set_option (sd, "-model", PROFILE_MODEL_IDX, "0");
 }
 
 /* Perform a power on reset.  */