Add org.gnu.gdb.i386.avx.
[deliverable/binutils-gdb.git] / sim / common / sim-module.c
index 0fb54717c54840d7a35d9bcb277ffef1cd2d5ff3..0180d0729da2b790f67bc70625ebb65b2ec454d0 100644 (file)
@@ -1,34 +1,43 @@
 /* Module support.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+
+   Copyright 1996, 1997, 1998, 2003, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
+
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 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, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
 #include "sim-io.h"
 #include "sim-options.h"
 #include "sim-assert.h"
 
+#if WITH_HW
+#include "sim-hw.h"
+#endif
+
 #include "libiberty.h"
 
 /* List of all modules.  */
 static MODULE_INSTALL_FN * const modules[] = {
   standard_install,
   sim_events_install,
+#ifdef SIM_HAVE_MODEL
+  sim_model_install,
+#endif
 #if WITH_ENGINE
   sim_engine_install,
 #endif
@@ -49,11 +58,8 @@ static MODULE_INSTALL_FN * const modules[] = {
 #if WITH_SCACHE
   scache_install,
 #endif
-#ifdef SIM_HAVE_MODEL
-  model_install,
-#endif
-#ifdef SIM_HAVE_BREAKPOINTS
-  sim_break_install,
+#if WITH_HW
+  sim_hw_install,
 #endif
   /* Configured in [simulator specific] additional modules.  */
 #ifdef MODULE_LIST
@@ -105,9 +111,6 @@ sim_post_argv_init (SIM_DESC sd)
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
   SIM_ASSERT (STATE_MODULES (sd) != NULL);
 
-  if (sim_module_init (sd) != SIM_RC_OK)
-    return SIM_RC_FAIL;
-
   /* Set the cpu->state backlinks for each cpu.  */
   for (i = 0; i < MAX_NR_PROCESSORS; ++i)
     {
@@ -115,6 +118,9 @@ sim_post_argv_init (SIM_DESC sd)
       CPU_INDEX (STATE_CPU (sd, i)) = i;
     }
 
+  if (sim_module_init (sd) != SIM_RC_OK)
+    return SIM_RC_FAIL;
+
   return SIM_RC_OK;
 }
 \f
This page took 0.024278 seconds and 4 git commands to generate.