X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-basics.h;h=b6bdea77e9691a64c07829e2faf7740d2fe67862;hb=05e682e3be7e3d9d63ec358dcf8943fd200545cb;hp=fc34b21618f1631add16049413349b4b13f93cb2;hpb=5b64ad42d36e6d487e1f7287d37fbc243a178e72;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index fc34b21618..b6bdea77e9 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -1,27 +1,27 @@ -/* This file is part of the program psim. +/* The common simulator framework for GDB, the GNU Debugger. - Copyright (C) 1994-1997, Andrew Cagney - Copyright (C) 1997, 1998, Free Software Foundation, Inc. + Copyright 2002-2020 Free Software Foundation, Inc. - 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 of the License, or - (at your option) any later version. + Contributed by Andrew Cagney and Red Hat. - 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. - - */ + This file is part of GDB. + 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 3 of the License, or + (at your option) any later version. -#ifndef _SIM_BASICS_H_ -#define _SIM_BASICS_H_ + 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, see . */ + + +#ifndef SIM_BASICS_H +#define SIM_BASICS_H /* Basic configuration */ @@ -48,7 +48,14 @@ extern int asprintf (char **result, const char *format, ...); #endif - +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + + /* Some versions of GCC include an attribute operator, define it */ #if !defined (__attribute__) @@ -60,7 +67,6 @@ extern int asprintf (char **result, const char *format, ...); /* Global types that code manipulates */ -typedef struct _device device; struct hw; struct _sim_fpu; @@ -126,14 +132,9 @@ typedef enum { /* Basic definitions - ordered so that nothing calls what comes after it. */ -/* FIXME: conditionalizing tconfig.h on HAVE_CONFIG_H seems wrong. */ -#ifdef HAVE_CONFIG_H -#include "tconfig.h" -#endif - #include "ansidecl.h" -#include "callback.h" -#include "remote-sim.h" +#include "gdb/callback.h" +#include "gdb/remote-sim.h" #include "sim-config.h" @@ -143,12 +144,13 @@ typedef enum { #include "sim-bits.h" #include "sim-endian.h" #include "sim-signal.h" -#include "sim-arange.h" #include "sim-utils.h" +#include "libiberty.h" + /* Note: Only the simpler interfaces are defined here. More heavy weight objects, such as core and events, are defined in the more serious sim-base.h header. */ -#endif /* _SIM_BASICS_H_ */ +#endif /* SIM_BASICS_H */