* autoconf correction
[deliverable/binutils-gdb.git] / sim / common / sim-base.h
index 654e71e30cdb8b221f13c2457e8f45e14c044e6a..420b137b6b2d8a8f4fc4131435519f6159c64677 100644 (file)
@@ -1,5 +1,5 @@
 /* Simulator pseudo baseclass.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -93,6 +93,7 @@ typedef struct _sim_cpu sim_cpu;
 #ifdef SIM_HAVE_BREAKPOINTS
 #include "sim-break.h"
 #endif
+#include "sim-cpu.h"
 
 /* Global pointer to current state while sim_resume is running.
    On a machine with lots of registers, it might be possible to reserve
@@ -174,6 +175,10 @@ typedef struct {
   struct _bfd *prog_bfd;
 #define STATE_PROG_BFD(sd) ((sd)->base.prog_bfd)
 
+  /* Symbol table for prog_bfd */
+  struct symbol_cache_entry **prog_syms;
+#define STATE_PROG_SYMS(sd) ((sd)->base.prog_syms)
+
   /* The program's text section.  */
   struct sec *text_section;
   /* Starting and ending text section addresses from the bfd.  */
@@ -226,6 +231,16 @@ typedef struct {
   struct sim_breakpoint *breakpoints;
 #define STATE_BREAKPOINTS(sd) ((sd)->base.breakpoints)
 
+#if WITH_HW
+  struct sim_hw *hw;
+#define STATE_HW(sd) ((sd)->base.hw)
+#endif
+
+  /* Should image loads be performed using the LMA or VMA?  Older
+     simulators use the VMA while newer simulators prefer the LMA. */
+  int load_at_lma_p;
+#define STATE_LOAD_AT_LMA_P(SD) ((SD)->base.load_at_lma_p)
+
   /* Marker for those wanting to do sanity checks.
      This should remain the last member of this struct to help catch
      miscompilation errors.  */
@@ -234,73 +249,8 @@ typedef struct {
 #define STATE_MAGIC(sd) ((sd)->base.magic)
 } sim_state_base;
 
-
-/* Pseudo baseclass for each cpu.  */
-
-typedef struct {
-
-  /* Backlink to main state struct.  */
-  SIM_DESC state;
-#define CPU_STATE(cpu) ((cpu)->base.state)
-
-  /* The name of the cpu.  */
-  const char *name;
-#define CPU_NAME(cpu) ((cpu)->base.name)
-
-  /* Options specific to this cpu.  */
-  struct option_list *options;
-#define CPU_OPTIONS(cpu) ((cpu)->base.options)
-
-  /* Processor specific core data */
-  sim_cpu_core core;
-#define CPU_CORE(cpu) (& (cpu)->base.core)
-
-  /* Trace data.  See sim-trace.h.  */
-  TRACE_DATA trace_data;
-#define CPU_TRACE_DATA(cpu) (& (cpu)->base.trace_data)
-
-  /* Maximum number of debuggable entities.
-     This debugging is not intended for normal use.
-     It is only enabled when the simulator is configured with --with-debug
-     which shouldn't normally be specified.  */
-#ifndef MAX_DEBUG_VALUES
-#define MAX_DEBUG_VALUES 4
-#endif
-
-  /* Boolean array of specified debugging flags.  */
-  char debug_flags[MAX_DEBUG_VALUES];
-#define CPU_DEBUG_FLAGS(cpu) ((cpu)->base.debug_flags)
-  /* Standard values.  */
-#define DEBUG_INSN_IDX 0
-#define DEBUG_NEXT_IDX 2 /* simulator specific debug bits begin here */
-
-  /* Debugging output goes to this or stderr if NULL.
-     We can't store `stderr' here as stderr goes through a callback.  */
-  FILE *debug_file;
-#define CPU_DEBUG_FILE(cpu) ((cpu)->base.debug_file)
-
-  /* Profile data.  See sim-profile.h.  */
-  PROFILE_DATA profile_data;
-#define CPU_PROFILE_DATA(cpu) (& (cpu)->base.profile_data)
-
-#ifdef SIM_HAVE_MODEL
-  /* Machine tables for this cpu.  See sim-model.h.  */
-  const MACH *mach;
-#define CPU_MACH(cpu) ((cpu)->base.mach)
-  /* The selected model.  */
-  const MODEL *model;
-#define CPU_MODEL(cpu) ((cpu)->base.model)
-#endif
-
-} sim_cpu_base;
-
-
 /* Functions for allocating/freeing a sim_state.  */
 SIM_DESC sim_state_alloc PARAMS ((SIM_OPEN_KIND kind, host_callback *callback));
 void sim_state_free PARAMS ((SIM_DESC));
 
-/* Return a pointer to the cpu data for CPU_NAME, or NULL if not found.  */
-sim_cpu *sim_cpu_lookup (SIM_DESC sd, const char *cpu_name);
-
-
 #endif /* SIM_BASE_H */
This page took 0.023704 seconds and 4 git commands to generate.