PowerPC64 .branch_lt address
[binutils-gdb.git] / sim / common / hw-instances.c
index 7fe6bed84bf269533ef3b9599dec6b0b61c16929..effb2252a647ab6018812b3404210db061e21cbb 100644 (file)
@@ -1,6 +1,6 @@
 /* The common simulator framework for GDB, the GNU Debugger.
 
-   Copyright 2002, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright 2002-2022 Free Software Foundation, Inc.
 
    Contributed by Andrew Cagney and Red Hat.
 
@@ -19,6 +19,8 @@
    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 "hw-main.h"
 #include "hw-base.h"
@@ -26,7 +28,8 @@
 #include "sim-io.h"
 #include "sim-assert.h"
 
-struct hw_instance_data {
+struct hw_instance_data
+{
   hw_finish_instance_method *to_finish;
   struct hw_instance *instances;
 };
@@ -86,7 +89,7 @@ hw_instance_delete (struct hw_instance *instance)
   struct hw *me = hw_instance_hw (instance);
   if (instance->to_instance_delete == NULL)
     hw_abort (me, "no delete method");
-  instance->method->delete(instance);
+  instance->method->delete (instance);
   if (instance->args != NULL)
     free (instance->args);
   if (instance->path != NULL)
@@ -108,7 +111,7 @@ hw_instance_delete (struct hw_instance *instance)
       struct hw_instance *curr = me->instances;
       while (curr != NULL)
        {
-         ASSERT(curr != instance);
+         ASSERT (curr != instance);
          curr = curr->next;
        }
       /* unlink the child */
@@ -172,7 +175,7 @@ hw_instance_call_method (struct hw_instance *instance,
     }
   while (method->name != NULL)
     {
-      if (strcmp(method->name, method_name) == 0)
+      if (strcmp (method->name, method_name) == 0)
        {
          return method->method (instance,
                                 n_stack_args, stack_args,
@@ -279,8 +282,8 @@ hw_instance_interceed (struct hw_instance *parent,
       *previous = instance;
     }
   instance->data = data;
-  instance->args = (args == NULL ? NULL : (char *) strdup(args));
-  instance->path = (path == NULL ? NULL : (char *) strdup(path));
+  instance->args = (args == NULL ? NULL : (char *) strdup (args));
+  instance->path = (path == NULL ? NULL : (char *) strdup (path));
   cap_add (instance->owner->ihandles, instance);
   return instance;
 #endif