PowerPC64 .branch_lt address
[binutils-gdb.git] / sim / common / sim-abort.c
index 06ae109a5b038f3bae5360b37ec806fd3206d312..5dc4a8c12a41dcfcaa40c36cb6a68d6da2ee083c 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic simulator abort.
-   Copyright (C) 1997, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-2022 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -17,7 +17,12 @@ 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 <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "sim-main.h"
 #include "sim-assert.h"
@@ -42,17 +47,17 @@ sim_engine_abort (SIM_DESC sd,
   if (sd != NULL)
     {
       va_list ap;
-      va_start(ap, fmt);
+      va_start (ap, fmt);
       sim_io_evprintf (sd, fmt, ap);
-      va_end(ap);
+      va_end (ap);
       sim_io_error (sd, "\n");
     }
   else
     {
       va_list ap;
-      va_start(ap, fmt);
+      va_start (ap, fmt);
       vfprintf (stderr, fmt, ap);
-      va_end(ap);
+      va_end (ap);
       fprintf (stderr, "\n");
       abort ();
     }