sim: punt zfree()
[deliverable/binutils-gdb.git] / sim / common / sim-module.c
index 35eb32a65ff13857e001f99597ed83af88754d9f..7b19d9d119efe0136b77df3a8eb4c7287f2aaabc 100644 (file)
@@ -1,22 +1,24 @@
 /* Module support.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+
+   Copyright 1996, 1997, 1998, 2003, 2007, 2008, 2009, 2010, 2011
+   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"
@@ -56,9 +58,6 @@ static MODULE_INSTALL_FN * const modules[] = {
 #if WITH_SCACHE
   scache_install,
 #endif
-#ifdef SIM_HAVE_BREAKPOINTS
-  sim_break_install,
-#endif
 #if WITH_HW
   sim_hw_install,
 #endif
@@ -89,7 +88,8 @@ sim_pre_argv_init (SIM_DESC sd, const char *myname)
     for (i = 0; i < MAX_NR_PROCESSORS; ++i)
       {
        char *name;
-       asprintf (&name, "cpu%d", i);
+       if (asprintf (&name, "cpu%d", i) < 0)
+         return SIM_RC_FAIL;
        CPU_NAME (STATE_CPU (sd, i)) = name;
       }
   }
@@ -228,7 +228,7 @@ sim_module_uninstall (SIM_DESC sd)
     for (d = modules->init_list; d != NULL; d = n)
       {
        n = d->next;
-       zfree (d);
+       free (d);
       }
   }
 
@@ -238,7 +238,7 @@ sim_module_uninstall (SIM_DESC sd)
     for (d = modules->resume_list; d != NULL; d = n)
       {
        n = d->next;
-       zfree (d);
+       free (d);
       }
   }
 
@@ -248,7 +248,7 @@ sim_module_uninstall (SIM_DESC sd)
     for (d = modules->suspend_list; d != NULL; d = n)
       {
        n = d->next;
-       zfree (d);
+       free (d);
       }
   }
 
@@ -258,7 +258,7 @@ sim_module_uninstall (SIM_DESC sd)
     for (d = modules->uninstall_list; d != NULL; d = n)
       {
        n = d->next;
-       zfree (d);
+       free (d);
       }
   }
 
@@ -268,11 +268,11 @@ sim_module_uninstall (SIM_DESC sd)
     for (d = modules->info_list; d != NULL; d = n)
       {
        n = d->next;
-       zfree (d);
+       free (d);
       }
   }
 
-  zfree (modules);
+  free (modules);
   STATE_MODULES (sd) = NULL;
 }
 
This page took 0.025575 seconds and 4 git commands to generate.