diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-13 22:14:40 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-17 00:11:48 -0400 |
commit | ef5058ae8714d68c0f671726618e721681523ac5 (patch) | |
tree | de9b85e73d69328fc91d905709fe65754cdc654b /sim/common | |
parent | 62cfa544a44b6891f8fcdec953232a99da74a21c (diff) | |
download | gdb-ef5058ae8714d68c0f671726618e721681523ac5.zip gdb-ef5058ae8714d68c0f671726618e721681523ac5.tar.gz gdb-ef5058ae8714d68c0f671726618e721681523ac5.tar.bz2 |
sim: split sim/callback.h include out
The sim-basics.h is too big and includes too many things. This leads
to some arch's sim-main.h having circular loop issues with defs, and
makes it hard to separate out common objects from arch-specific defs.
By splitting up sim-basics.h and killing off sim-main.h, it'll make
it easier to separate out the two.
Start with splitting out sim/callback.h.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 9 | ||||
-rw-r--r-- | sim/common/cgen-trace.c | 1 | ||||
-rw-r--r-- | sim/common/nrun.c | 1 | ||||
-rw-r--r-- | sim/common/sim-basics.h | 1 | ||||
-rw-r--r-- | sim/common/sim-endian.h | 1 | ||||
-rw-r--r-- | sim/common/sim-hw.c | 1 | ||||
-rw-r--r-- | sim/common/sim-io.c | 1 | ||||
-rw-r--r-- | sim/common/sim-syscall.c | 1 | ||||
-rw-r--r-- | sim/common/sim-syscall.h | 2 | ||||
-rw-r--r-- | sim/common/sim-trace.c | 1 | ||||
-rw-r--r-- | sim/common/sim-utils.h | 1 |
11 files changed, 19 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 60b94cf..abb2ec6 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +2021-06-17 Mike Frysinger <vapier@gentoo.org> + + * cgen-trace.c: Include sim/callback.h. + * nrun.c, sim-hw.c, sim-io.c, sim-syscall.c, sim-trace.c: Likewise. + * sim-basics.h: Delete sim/callback.h include. + * sim-endian.h: Include bfd.h. + * sim-syscall.h (struct cb_syscall): New forward decl. + * sim-utils.h (sim_analyze_program): Likewise. + 2021-06-16 Mike Frysinger <vapier@gentoo.org> * Make-common.in (CONFIG_CFLAGS): Change @DEFS@ to -DHAVE_CONFIG_H. diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c index 66250c0..206720c 100644 --- a/sim/common/cgen-trace.c +++ b/sim/common/cgen-trace.c @@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "bfd.h" #include "sim-main.h" #include "sim-fpu.h" +#include "sim/callback.h" #ifndef SIZE_INSTRUCTION #define SIZE_INSTRUCTION 16 diff --git a/sim/common/nrun.c b/sim/common/nrun.c index e39a0c6..ba293d1 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> #include "sim-main.h" +#include "sim/callback.h" #include "bfd.h" #include "environ.h" diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index ac63aef..1354742 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -112,7 +112,6 @@ typedef enum { /* Basic definitions - ordered so that nothing calls what comes after it. */ #include "ansidecl.h" -#include "sim/callback.h" #include "sim/sim.h" #include "sim-config.h" diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h index 6e9101f..7b663a3 100644 --- a/sim/common/sim-endian.h +++ b/sim/common/sim-endian.h @@ -23,6 +23,7 @@ #ifndef SIM_ENDIAN_H #define SIM_ENDIAN_H +#include "bfd.h" /* C byte conversion functions */ diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c index 95d9504..9a3db17 100644 --- a/sim/common/sim-hw.c +++ b/sim/common/sim-hw.c @@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-main.h" #include "sim-assert.h" #include "sim-options.h" +#include "sim/callback.h" #include "sim-hw.h" diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c index b5e874b..e09a4af 100644 --- a/sim/common/sim-io.c +++ b/sim/common/sim-io.c @@ -24,6 +24,7 @@ #include "sim-main.h" #include "sim-io.h" +#include "sim/callback.h" #include "targ-vals.h" #include <errno.h> diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c index 0f7601c..be3ff8f 100644 --- a/sim/common/sim-syscall.c +++ b/sim/common/sim-syscall.c @@ -24,6 +24,7 @@ #include "sim-main.h" #include "sim-syscall.h" +#include "sim/callback.h" #include "targ-vals.h" /* Read/write functions for system call interface. */ diff --git a/sim/common/sim-syscall.h b/sim/common/sim-syscall.h index 6f79d9d..562f443 100644 --- a/sim/common/sim-syscall.h +++ b/sim/common/sim-syscall.h @@ -20,6 +20,8 @@ #ifndef SIM_SYSCALL_H #define SIM_SYSCALL_H +struct cb_syscall; + /* Perform a syscall on the behalf of the target program. The error/result are normalized into a single value (like a lot of operating systems do). If you want the split values, see the other function below. diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index b8224e0..2c37989 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-io.h" #include "sim-options.h" #include "sim-fpu.h" +#include "sim/callback.h" #include "bfd.h" #include "libiberty.h" diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h index 9cc19f5..bfc8ac7 100644 --- a/sim/common/sim-utils.h +++ b/sim/common/sim-utils.h @@ -60,6 +60,7 @@ SIM_RC sim_analyze_program (SIM_DESC sd, const char *prog_name, write the program sections at LMA interpreted as a virtual address. This is still accommodated for backward compatibility reasons. */ +typedef struct host_callback_struct host_callback; typedef int sim_write_fn (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length); struct bfd *sim_load_file (SIM_DESC sd, const char *myname, |