This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Move callback.h and remote-sim.h to include/gdb/


Hello,

This knocks on the head one of those long standing items on the things-to-do list. This should mean that all GDB maintained include files are now in include/gdb/.

You'll need to update src/gdb/ src/include/ and src/sim/.

commiting,
Andrew

Index: gdb/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (callback_h): Define.
	(remote_sim_h): Update path to remote-sim.h.
	(remote-rdp.o): Add $(callback_h).
	(remote-sim.o): Use $(callback_h).
	* remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* remote-rdp.c: Include "gdb/callback.h".

Index: include/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* remote-sim.h: Move to directory gdb/.
	* callback.h: Move to directory gdb/.

Index: include/gdb/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* callback.h: Copy to here from directory above.
	* remote-sim.h: Copy to here from directory above.

Index: sim/arm/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* wrapper.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* armos.c: Include "gdb/callback.h".

Index: sim/common/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* gentmap.c (gen_targ_map_c): Generate "gdb/callback.h".
	* sim-basics.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* run.c: Ditto.
	* sim-load.c: Ditto.
	* callback.c: Ditto.
	* syscall.c: Ditto.
	* Make-common.in (callback_h): Define.
	(remote_sim_h): Define.
	(run.o): Update.
	(callback.o): Update.
	(syscall.o): Update.
	(sim-load.o): 
	(nrun.o): Update.
	(sim-hload.o): Update.
	(sim-io.o): Update.
	(sim-reason.o): Update.
	(sim-reg.o): Update.
	(sim-resume.o): Update.

Index: sim/d10v/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (INCLUDE): Update path to callback.h.
	* gencode.c: Do not include "callback.h".
	* d10v_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* interp.c: Ditto.

Index: sim/erc32/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* sis.h: Include "gdb/remote-sim.h" and "gdb/callback.h".
	* interf.c: Include "gdb/remote-sim.h".

Index: sim/h8300/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/h8500/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/m68hc11/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (INCLUDE): Update path to callback.h.
	* sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/mcore/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/mips/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/mn10200/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (INCLUDE): Update path to callback.h.
	* mn10200_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/mn10300/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* Makefile.in (INCLUDE): Update path to callback.h.
	* mn10300_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* tconfig.in: Ditto.

Index: sim/ppc/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* main.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* sim_calls.c: Ditto.

Index: sim/sh/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/w65/ChangeLog
2002-06-08  Andrew Cagney  <cagney@redhat.com>

	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".

Index: sim/z8k/ChangeLog
2002-06-09  Andrew Cagney  <cagney@redhat.com>

	* iface.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
	* support.c: Ditto.

Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.205
diff -u -r1.205 Makefile.in
--- gdb/Makefile.in	31 May 2002 00:59:13 -0000	1.205
+++ gdb/Makefile.in	9 Jun 2002 15:27:33 -0000
@@ -568,8 +568,9 @@
 getopt_h =	$(INCLUDE_DIR)/getopt.h
 floatformat_h =	$(INCLUDE_DIR)/floatformat.h
 bfd_h =		$(BFD_DIR)/bfd.h
+callback_h =	$(INCLUDE_DIR)/gdb/callback.h
 dis_asm_h =	$(INCLUDE_DIR)/dis-asm.h 
-remote_sim_h =	$(INCLUDE_DIR)/remote-sim.h
+remote_sim_h =	$(INCLUDE_DIR)/gdb/remote-sim.h
 demangle_h =    $(INCLUDE_DIR)/demangle.h
 obstack_h =     $(INCLUDE_DIR)/obstack.h
 sim_d10v_h =	$(INCLUDE_DIR)/gdb/sim-d10v.h
@@ -1975,7 +1976,7 @@
 	fi
 
 remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) $(gdb_string_h) $(arm_tdep_h)
+	$(inferior_h) $(gdb_string_h) $(arm_tdep_h) $(callback_h)
 
 remote-bug.o: remote-bug.c $(defs_h) $(gdbcore_h) $(serial_h) \
 	$(inferior_h) $(target_h) $(terminal_h) $(remote_utils_h) \
@@ -2012,7 +2013,7 @@
 	$(gdb_string_h) $(regcache_h)
 
 remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) $(gdb_string_h) \
-	$(terminal_h) $(target_h) $(gdbcore_h) $(INCLUDE_DIR)/callback.h \
+	$(terminal_h) $(target_h) $(gdbcore_h) $(callback_h) \
 	$(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h) \
 	$(sim_regno_h)
 
Index: gdb/remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.27
diff -u -r1.27 remote-rdp.c
--- gdb/remote-rdp.c	9 May 2002 18:44:49 -0000	1.27
+++ gdb/remote-rdp.c	9 Jun 2002 15:27:34 -0000
@@ -41,7 +41,7 @@
 #include "defs.h"
 #include "inferior.h"
 #include "value.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "command.h"
 #include <ctype.h>
 #include <fcntl.h>
Index: gdb/remote-sim.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sim.c,v
retrieving revision 1.23
diff -u -r1.23 remote-sim.c
--- gdb/remote-sim.c	29 May 2002 16:39:55 -0000	1.23
+++ gdb/remote-sim.c	9 Jun 2002 15:27:34 -0000
@@ -35,8 +35,8 @@
 #include "terminal.h"
 #include "target.h"
 #include "gdbcore.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "remote-utils.h"
 #include "command.h"
 #include "regcache.h"
Index: include/callback.h
===================================================================
RCS file: include/callback.h
diff -N include/callback.h
--- include/callback.h	3 May 1999 07:29:01 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,270 +0,0 @@
-/* Remote target system call callback support.
-   Copyright 1997 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-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 2 of the License, or
-(at your option) any later version.
-
-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 interface isn't intended to be specific to any particular kind
-   of remote (hardware, simulator, whatever).  As such, support for it
-   (e.g. sim/common/callback.c) should *not* live in the simulator source
-   tree, nor should it live in the gdb source tree.  */
-
-/* There are various ways to handle system calls:
-
-   1) Have a simulator intercept the appropriate trap instruction and
-   directly perform the system call on behalf of the target program.
-   This is the typical way of handling system calls for embedded targets.
-   [Handling system calls for embedded targets isn't that much of an
-   oxymoron as running compiler testsuites make use of the capability.]
-
-   This method of system call handling is done when STATE_ENVIRONMENT
-   is ENVIRONMENT_USER.
-
-   2) Have a simulator emulate the hardware as much as possible.
-   If the program running on the real hardware communicates with some sort
-   of target manager, one would want to be able to run this program on the
-   simulator as well.
-
-   This method of system call handling is done when STATE_ENVIRONMENT
-   is ENVIRONMENT_OPERATING.
-*/
-
-#ifndef CALLBACK_H
-#define CALLBACK_H
-
-/* ??? The reason why we check for va_start here should be documented.  */
-
-#ifndef va_start
-#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-/* Mapping of host/target values.  */
-/* ??? For debugging purposes, one might want to add a string of the
-   name of the symbol.  */
-
-typedef struct {
-  int host_val;
-  int target_val;
-} CB_TARGET_DEFS_MAP;
-
-#define MAX_CALLBACK_FDS 10
-
-/* Forward decl for stat/fstat.  */
-struct stat;
-
-typedef struct host_callback_struct host_callback;
-
-struct host_callback_struct 
-{
-  int (*close) PARAMS ((host_callback *,int));
-  int (*get_errno) PARAMS ((host_callback *));
-  int (*isatty) PARAMS ((host_callback *, int));
-  int (*lseek) PARAMS ((host_callback *, int, long , int));
-  int (*open) PARAMS ((host_callback *, const char*, int mode));
-  int (*read) PARAMS ((host_callback *,int,  char *, int));
-  int (*read_stdin) PARAMS (( host_callback *, char *, int));
-  int (*rename) PARAMS ((host_callback *, const char *, const char *));
-  int (*system) PARAMS ((host_callback *, const char *));
-  long (*time) PARAMS ((host_callback *, long *));
-  int (*unlink) PARAMS ((host_callback *, const char *));
-  int (*write) PARAMS ((host_callback *,int, const char *, int));
-  int (*write_stdout) PARAMS ((host_callback *, const char *, int));
-  void (*flush_stdout) PARAMS ((host_callback *));
-  int (*write_stderr) PARAMS ((host_callback *, const char *, int));
-  void (*flush_stderr) PARAMS ((host_callback *));
-  int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
-  int (*fstat) PARAMS ((host_callback *, int, struct stat *));
-
-  /* When present, call to the client to give it the oportunity to
-     poll any io devices for a request to quit (indicated by a nonzero
-     return value). */
-  int (*poll_quit) PARAMS ((host_callback *));
-
-  /* Used when the target has gone away, so we can close open
-     handles and free memory etc etc.  */
-  int (*shutdown) PARAMS ((host_callback *));
-  int (*init)     PARAMS ((host_callback *));
-
-  /* depreciated, use vprintf_filtered - Talk to the user on a console.  */
-  void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
-
-  /* Talk to the user on a console.  */
-  void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
-  /* Same as vprintf_filtered but to stderr.  */
-  void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
-  /* Print an error message and "exit".
-     In the case of gdb "exiting" means doing a longjmp back to the main
-     command loop.  */
-  void (*error) PARAMS ((host_callback *, const char *, ...));
-
-  int last_errno;		/* host format */
-
-  int fdmap[MAX_CALLBACK_FDS];
-  char fdopen[MAX_CALLBACK_FDS];
-  char alwaysopen[MAX_CALLBACK_FDS];
-
-  /* System call numbers.  */
-  CB_TARGET_DEFS_MAP *syscall_map;
-  /* Errno values.  */
-  CB_TARGET_DEFS_MAP *errno_map;
-  /* Flags to the open system call.  */
-  CB_TARGET_DEFS_MAP *open_map;
-  /* Signal numbers.  */
-  CB_TARGET_DEFS_MAP *signal_map;
-  /* Layout of `stat' struct.
-     The format is a series of "name,length" pairs separated by colons.
-     Empty space is indicated with a `name' of "space".
-     All padding must be explicitly mentioned.
-     Lengths are in bytes.  If this needs to be extended to bits,
-     use "name.bits".
-     Example: "st_dev,4:st_ino,4:st_mode,4:..."  */
-  const char *stat_map;
-
-  /* Marker for those wanting to do sanity checks.
-     This should remain the last member of this struct to help catch
-     miscompilation errors. */
-#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
-  int magic;
-};
-
-extern host_callback default_callback;
-
-/* Canonical versions of system call numbers.
-   It's not intended to willy-nilly throw every system call ever heard
-   of in here.  Only include those that have an important use.
-   ??? One can certainly start a discussion over the ones that are currently
-   here, but that will always be true.  */
-
-/* These are used by the ANSI C support of libc.  */
-#define	CB_SYS_exit	1
-#define	CB_SYS_open	2
-#define	CB_SYS_close	3
-#define	CB_SYS_read	4
-#define	CB_SYS_write	5
-#define	CB_SYS_lseek	6
-#define	CB_SYS_unlink	7
-#define	CB_SYS_getpid	8
-#define	CB_SYS_kill	9
-#define CB_SYS_fstat    10
-/*#define CB_SYS_sbrk	11 - not currently a system call, but reserved.  */
-
-/* ARGV support.  */
-#define CB_SYS_argvlen	12
-#define CB_SYS_argv	13
-
-/* These are extras added for one reason or another.  */
-#define CB_SYS_chdir	14
-#define CB_SYS_stat	15
-#define CB_SYS_chmod 	16
-#define CB_SYS_utime 	17
-#define CB_SYS_time 	18
-
-/* Struct use to pass and return information necessary to perform a
-   system call.  */
-/* FIXME: Need to consider target word size.  */
-
-typedef struct cb_syscall {
-  /* The target's value of what system call to perform.  */
-  int func;
-  /* The arguments to the syscall.  */
-  long arg1, arg2, arg3, arg4;
-
-  /* The result.  */
-  long result;
-  /* Some system calls have two results.  */
-  long result2;
-  /* The target's errno value, or 0 if success.
-     This is converted to the target's value with host_to_target_errno.  */
-  int errcode;
-
-  /* Working space to be used by memory read/write callbacks.  */
-  PTR p1;
-  PTR p2;
-  long x1,x2;
-
-  /* Callbacks for reading/writing memory (e.g. for read/write syscalls).
-     ??? long or unsigned long might be better to use for the `count'
-     argument here.  We mimic sim_{read,write} for now.  Be careful to
-     test any changes with -Wall -Werror, mixed signed comparisons
-     will get you.  */
-  int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
-			   unsigned long /*taddr*/, char * /*buf*/,
-			   int /*bytes*/));
-  int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
-			    unsigned long /*taddr*/, const char * /*buf*/,
-			    int /*bytes*/));
-
-  /* For sanity checking, should be last entry.  */
-  int magic;
-} CB_SYSCALL;
-
-/* Magic number sanity checker.  */
-#define CB_SYSCALL_MAGIC 0x12344321
-
-/* Macro to initialize CB_SYSCALL.  Called first, before filling in
-   any fields.  */
-#define CB_SYSCALL_INIT(sc) \
-do { \
-  memset ((sc), 0, sizeof (*(sc))); \
-  (sc)->magic = CB_SYSCALL_MAGIC; \
-} while (0)
-
-/* Return codes for various interface routines.  */
-
-typedef enum {
-  CB_RC_OK = 0,
-  /* generic error */
-  CB_RC_ERR,
-  /* either file not found or no read access */
-  CB_RC_ACCESS,
-  CB_RC_NO_MEM
-} CB_RC;
-
-/* Read in target values for system call numbers, errno values, signals.  */
-CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
-
-/* Translate target to host syscall function numbers.  */
-int cb_target_to_host_syscall PARAMS ((host_callback *, int));
-
-/* Translate host to target errno value.  */
-int cb_host_to_target_errno PARAMS ((host_callback *, int));
-
-/* Translate target to host open flags.  */
-int cb_target_to_host_open PARAMS ((host_callback *, int));
-
-/* Translate target signal number to host.  */
-int cb_target_to_host_signal PARAMS ((host_callback *, int));
-
-/* Translate host signal number to target.  */
-int cb_host_to_target_signal PARAMS ((host_callback *, int));
-
-/* Translate host stat struct to target.
-   If stat struct ptr is NULL, just compute target stat struct size.
-   Result is size of target stat struct or 0 if error.  */
-int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
-
-/* Perform a system call.  */
-CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
-
-#endif
Index: include/remote-sim.h
===================================================================
RCS file: include/remote-sim.h
diff -N include/remote-sim.h
--- include/remote-sim.h	14 Mar 2001 02:27:43 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,354 +0,0 @@
-/* This file defines the interface between the simulator and gdb.
-   Copyright 1993, 1994, 1996, 1997, 1998, 2000
-   Free Software Foundation, Inc.
-
-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 2 of the License, or
-(at your option) any later version.
-
-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.  */
-
-#if !defined (REMOTE_SIM_H)
-#define REMOTE_SIM_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This file is used when building stand-alone simulators, so isolate this
-   file from gdb.  */
-
-/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
-   gdb does (unsigned int - from defs.h).  */
-
-#ifndef CORE_ADDR_TYPE
-typedef unsigned int SIM_ADDR;
-#else
-typedef CORE_ADDR_TYPE SIM_ADDR;
-#endif
-
-
-/* Semi-opaque type used as result of sim_open and passed back to all
-   other routines.  "desc" is short for "descriptor".
-   It is up to each simulator to define `sim_state'.  */
-
-typedef struct sim_state *SIM_DESC;
-
-
-/* Values for `kind' arg to sim_open.  */
-
-typedef enum {
-  SIM_OPEN_STANDALONE, /* simulator used standalone (run.c) */
-  SIM_OPEN_DEBUG       /* simulator used by debugger (gdb) */
-} SIM_OPEN_KIND;
-
-
-/* Return codes from various functions.  */
-
-typedef enum {
-  SIM_RC_FAIL = 0,
-  SIM_RC_OK = 1,
-  SIM_RC_UNKNOWN_BREAKPOINT = 2,
-  SIM_RC_INSUFFICIENT_RESOURCES = 3,
-  SIM_RC_DUPLICATE_BREAKPOINT = 4
-} SIM_RC;
-
-
-/* The bfd struct, as an opaque type.  */
-
-struct _bfd;
-
-
-/* Main simulator entry points.  */
-
-
-/* Create a fully initialized simulator instance.
-
-   (This function is called when the simulator is selected from the
-   gdb command line.)
-
-   KIND specifies how the simulator shall be used.  Currently there
-   are only two kinds: stand-alone and debug.
-
-   CALLBACK specifies a standard host callback (defined in callback.h).
-
-   ABFD, when non NULL, designates a target program.  The program is
-   not loaded.
-
-   ARGV is a standard ARGV pointer such as that passed from the
-   command line.  The syntax of the argument list is is assumed to be
-   ``SIM-PROG { SIM-OPTION } [ TARGET-PROGRAM { TARGET-OPTION } ]''.
-   The trailing TARGET-PROGRAM and args are only valid for a
-   stand-alone simulator.
-
-   On success, the result is a non NULL descriptor that shall be
-   passed to the other sim_foo functions.  While the simulator
-   configuration can be parameterized by (in decreasing precedence)
-   ARGV's SIM-OPTION, ARGV's TARGET-PROGRAM and the ABFD argument, the
-   successful creation of the simulator shall not dependent on the
-   presence of any of these arguments/options.
-
-   Hardware simulator: The created simulator shall be sufficiently
-   initialized to handle, with out restrictions any client requests
-   (including memory reads/writes, register fetch/stores and a
-   resume).
-
-   Process simulator: that process is not created until a call to
-   sim_create_inferior.  FIXME: What should the state of the simulator
-   be? */
-
-SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct _bfd *abfd, char **argv));
-
-
-/* Destory a simulator instance.
-
-   QUITTING is non-zero if we cannot hang on errors.
-
-   This may involve freeing target memory and closing any open files
-   and mmap'd areas.  You cannot assume sim_kill has already been
-   called. */
-
-void sim_close PARAMS ((SIM_DESC sd, int quitting));
-
-
-/* Load program PROG into the simulators memory.
-
-   If ABFD is non-NULL, the bfd for the file has already been opened.
-   The result is a return code indicating success.
-
-   Hardware simulator: Normally, each program section is written into
-   memory according to that sections LMA using physical (direct)
-   addressing.  The exception being systems, such as PPC/CHRP, which
-   support more complicated program loaders.  A call to this function
-   should not effect the state of the processor registers.  Multiple
-   calls to this function are permitted and have an accumulative
-   effect.
-
-   Process simulator: Calls to this function may be ignored.
-
-   FIXME: Most hardware simulators load the image at the VMA using
-   virtual addressing.
-
-   FIXME: For some hardware targets, before a loaded program can be
-   executed, it requires the manipulation of VM registers and tables.
-   Such manipulation should probably (?) occure in
-   sim_create_inferior. */
-
-SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct _bfd *abfd, int from_tty));
-
-
-/* Prepare to run the simulated program.
-
-   ABFD, if not NULL, provides initial processor state information.
-   ARGV and ENV, if non NULL, are NULL terminated lists of pointers.
-
-   Hardware simulator: This function shall initialize the processor
-   registers to a known value.  The program counter and possibly stack
-   pointer shall be set using information obtained from ABFD (or
-   hardware reset defaults).  ARGV and ENV, dependant on the target
-   ABI, may be written to memory.
-
-   Process simulator: After a call to this function, a new process
-   instance shall exist. The TEXT, DATA, BSS and stack regions shall
-   all be initialized, ARGV and ENV shall be written to process
-   address space (according to the applicable ABI) and the program
-   counter and stack pointer set accordingly. */
-
-SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct _bfd *abfd, char **argv, char **env));
-
-
-/* Fetch LENGTH bytes of the simulated program's memory.  Start fetch
-   at virtual address MEM and store in BUF.  Result is number of bytes
-   read, or zero if error.  */
-
-int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Store LENGTH bytes from BUF into the simulated program's
-   memory. Store bytes starting at virtual address MEM. Result is
-   number of bytes write, or zero if error.  */
-
-int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Fetch register REGNO storing its raw (target endian) value in the
-   LENGTH byte buffer BUF.  Return the actual size of the register or
-   zero if REGNO is not applicable.
-
-   Legacy implementations ignore LENGTH and always return -1.
-
-   If LENGTH does not match the size of REGNO no data is transfered
-   (the actual register size is still returned). */
-
-int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Store register REGNO from the raw (target endian) value in BUF.
-   Return the actual size of the register or zero if REGNO is not
-   applicable.
-
-   Legacy implementations ignore LENGTH and always return -1.
-
-   If LENGTH does not match the size of REGNO no data is transfered
-   (the actual register size is still returned). */
-
-int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Print whatever statistics the simulator has collected.
-
-   VERBOSE is currently unused and must always be zero.  */
-
-void sim_info PARAMS ((SIM_DESC sd, int verbose));
-
-
-/* Run (or resume) the simulated program.
-
-   STEP, when non-zero indicates that only a single simulator cycle
-   should be emulated.
-
-   SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
-   event (hardware interrupt, signal) to be delivered to the simulated
-   program.
-
-   Hardware simulator: If the SIGRC value returned by
-   sim_stop_reason() is passed back to the simulator via SIGGNAL then
-   the hardware simulator shall correctly deliver the hardware event
-   indicated by that signal.  If a value of zero is passed in then the
-   simulation will continue as if there were no outstanding signal.
-   The effect of any other SIGGNAL value is is implementation
-   dependant.
-
-   Process simulator: If SIGRC is non-zero then the corresponding
-   signal is delivered to the simulated program and execution is then
-   continued.  A zero SIGRC value indicates that the program should
-   continue as normal. */
-
-void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
-
-
-/* Asynchronous request to stop the simulation.
-   A nonzero return indicates that the simulator is able to handle
-   the request */
-
-int sim_stop PARAMS ((SIM_DESC sd));
-
-
-/* Fetch the REASON why the program stopped.
-
-   SIM_EXITED: The program has terminated. SIGRC indicates the target
-   dependant exit status.
-
-   SIM_STOPPED: The program has stopped.  SIGRC uses the host's signal
-   numbering as a way of identifying the reaon: program interrupted by
-   user via a sim_stop request (SIGINT); a breakpoint instruction
-   (SIGTRAP); a completed single step (SIGTRAP); an internal error
-   condition (SIGABRT); an illegal instruction (SIGILL); Access to an
-   undefined memory region (SIGSEGV); Mis-aligned memory access
-   (SIGBUS).  For some signals information in addition to the signal
-   number may be retained by the simulator (e.g. offending address),
-   that information is not directly accessable via this interface.
-
-   SIM_SIGNALLED: The program has been terminated by a signal. The
-   simulator has encountered target code that causes the the program
-   to exit with signal SIGRC.
-
-   SIM_RUNNING, SIM_POLLING: The return of one of these values
-   indicates a problem internal to the simulator. */
-
-enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
-
-void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc));
-
-
-/* Passthru for other commands that the simulator might support.
-   Simulators should be prepared to deal with any combination of NULL
-   or empty CMD. */
-
-void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
-
-/* Call these functions to set and clear breakpoints at ADDR. */
-
-SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
-
-/* These functions are used to enable and disable breakpoints. */
-
-SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
-SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
-
-
-/* Provide simulator with a default (global) host_callback_struct.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-/* Set the size of the simulator memory array.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_size PARAMS ((int i));
-
-
-/* Single-step simulator with tracing enabled.
-   THIS PROCEDURE IS DEPRECIATED.
-   THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-int sim_trace PARAMS ((SIM_DESC sd));
-
-
-/* Enable tracing.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
-/* Configure the size of the profile buffer.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_profile_size PARAMS ((int n));
-
-
-/* Kill the running program.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure will be replaced as part of the introduction of
-   multi-cpu simulators. */
-
-void sim_kill PARAMS ((SIM_DESC sd));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined (REMOTE_SIM_H) */
Index: include/gdb/callback.h
===================================================================
RCS file: include/gdb/callback.h
diff -N include/gdb/callback.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ include/gdb/callback.h	9 Jun 2002 15:27:36 -0000
@@ -0,0 +1,270 @@
+/* Remote target system call callback support.
+   Copyright 1997 Free Software Foundation, Inc.
+   Contributed by Cygnus Solutions.
+
+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 2 of the License, or
+(at your option) any later version.
+
+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 interface isn't intended to be specific to any particular kind
+   of remote (hardware, simulator, whatever).  As such, support for it
+   (e.g. sim/common/callback.c) should *not* live in the simulator source
+   tree, nor should it live in the gdb source tree.  */
+
+/* There are various ways to handle system calls:
+
+   1) Have a simulator intercept the appropriate trap instruction and
+   directly perform the system call on behalf of the target program.
+   This is the typical way of handling system calls for embedded targets.
+   [Handling system calls for embedded targets isn't that much of an
+   oxymoron as running compiler testsuites make use of the capability.]
+
+   This method of system call handling is done when STATE_ENVIRONMENT
+   is ENVIRONMENT_USER.
+
+   2) Have a simulator emulate the hardware as much as possible.
+   If the program running on the real hardware communicates with some sort
+   of target manager, one would want to be able to run this program on the
+   simulator as well.
+
+   This method of system call handling is done when STATE_ENVIRONMENT
+   is ENVIRONMENT_OPERATING.
+*/
+
+#ifndef CALLBACK_H
+#define CALLBACK_H
+
+/* ??? The reason why we check for va_start here should be documented.  */
+
+#ifndef va_start
+#include <ansidecl.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#endif
+
+/* Mapping of host/target values.  */
+/* ??? For debugging purposes, one might want to add a string of the
+   name of the symbol.  */
+
+typedef struct {
+  int host_val;
+  int target_val;
+} CB_TARGET_DEFS_MAP;
+
+#define MAX_CALLBACK_FDS 10
+
+/* Forward decl for stat/fstat.  */
+struct stat;
+
+typedef struct host_callback_struct host_callback;
+
+struct host_callback_struct 
+{
+  int (*close) PARAMS ((host_callback *,int));
+  int (*get_errno) PARAMS ((host_callback *));
+  int (*isatty) PARAMS ((host_callback *, int));
+  int (*lseek) PARAMS ((host_callback *, int, long , int));
+  int (*open) PARAMS ((host_callback *, const char*, int mode));
+  int (*read) PARAMS ((host_callback *,int,  char *, int));
+  int (*read_stdin) PARAMS (( host_callback *, char *, int));
+  int (*rename) PARAMS ((host_callback *, const char *, const char *));
+  int (*system) PARAMS ((host_callback *, const char *));
+  long (*time) PARAMS ((host_callback *, long *));
+  int (*unlink) PARAMS ((host_callback *, const char *));
+  int (*write) PARAMS ((host_callback *,int, const char *, int));
+  int (*write_stdout) PARAMS ((host_callback *, const char *, int));
+  void (*flush_stdout) PARAMS ((host_callback *));
+  int (*write_stderr) PARAMS ((host_callback *, const char *, int));
+  void (*flush_stderr) PARAMS ((host_callback *));
+  int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
+  int (*fstat) PARAMS ((host_callback *, int, struct stat *));
+
+  /* When present, call to the client to give it the oportunity to
+     poll any io devices for a request to quit (indicated by a nonzero
+     return value). */
+  int (*poll_quit) PARAMS ((host_callback *));
+
+  /* Used when the target has gone away, so we can close open
+     handles and free memory etc etc.  */
+  int (*shutdown) PARAMS ((host_callback *));
+  int (*init)     PARAMS ((host_callback *));
+
+  /* depreciated, use vprintf_filtered - Talk to the user on a console.  */
+  void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
+
+  /* Talk to the user on a console.  */
+  void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
+
+  /* Same as vprintf_filtered but to stderr.  */
+  void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
+
+  /* Print an error message and "exit".
+     In the case of gdb "exiting" means doing a longjmp back to the main
+     command loop.  */
+  void (*error) PARAMS ((host_callback *, const char *, ...));
+
+  int last_errno;		/* host format */
+
+  int fdmap[MAX_CALLBACK_FDS];
+  char fdopen[MAX_CALLBACK_FDS];
+  char alwaysopen[MAX_CALLBACK_FDS];
+
+  /* System call numbers.  */
+  CB_TARGET_DEFS_MAP *syscall_map;
+  /* Errno values.  */
+  CB_TARGET_DEFS_MAP *errno_map;
+  /* Flags to the open system call.  */
+  CB_TARGET_DEFS_MAP *open_map;
+  /* Signal numbers.  */
+  CB_TARGET_DEFS_MAP *signal_map;
+  /* Layout of `stat' struct.
+     The format is a series of "name,length" pairs separated by colons.
+     Empty space is indicated with a `name' of "space".
+     All padding must be explicitly mentioned.
+     Lengths are in bytes.  If this needs to be extended to bits,
+     use "name.bits".
+     Example: "st_dev,4:st_ino,4:st_mode,4:..."  */
+  const char *stat_map;
+
+  /* Marker for those wanting to do sanity checks.
+     This should remain the last member of this struct to help catch
+     miscompilation errors. */
+#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
+  int magic;
+};
+
+extern host_callback default_callback;
+
+/* Canonical versions of system call numbers.
+   It's not intended to willy-nilly throw every system call ever heard
+   of in here.  Only include those that have an important use.
+   ??? One can certainly start a discussion over the ones that are currently
+   here, but that will always be true.  */
+
+/* These are used by the ANSI C support of libc.  */
+#define	CB_SYS_exit	1
+#define	CB_SYS_open	2
+#define	CB_SYS_close	3
+#define	CB_SYS_read	4
+#define	CB_SYS_write	5
+#define	CB_SYS_lseek	6
+#define	CB_SYS_unlink	7
+#define	CB_SYS_getpid	8
+#define	CB_SYS_kill	9
+#define CB_SYS_fstat    10
+/*#define CB_SYS_sbrk	11 - not currently a system call, but reserved.  */
+
+/* ARGV support.  */
+#define CB_SYS_argvlen	12
+#define CB_SYS_argv	13
+
+/* These are extras added for one reason or another.  */
+#define CB_SYS_chdir	14
+#define CB_SYS_stat	15
+#define CB_SYS_chmod 	16
+#define CB_SYS_utime 	17
+#define CB_SYS_time 	18
+
+/* Struct use to pass and return information necessary to perform a
+   system call.  */
+/* FIXME: Need to consider target word size.  */
+
+typedef struct cb_syscall {
+  /* The target's value of what system call to perform.  */
+  int func;
+  /* The arguments to the syscall.  */
+  long arg1, arg2, arg3, arg4;
+
+  /* The result.  */
+  long result;
+  /* Some system calls have two results.  */
+  long result2;
+  /* The target's errno value, or 0 if success.
+     This is converted to the target's value with host_to_target_errno.  */
+  int errcode;
+
+  /* Working space to be used by memory read/write callbacks.  */
+  PTR p1;
+  PTR p2;
+  long x1,x2;
+
+  /* Callbacks for reading/writing memory (e.g. for read/write syscalls).
+     ??? long or unsigned long might be better to use for the `count'
+     argument here.  We mimic sim_{read,write} for now.  Be careful to
+     test any changes with -Wall -Werror, mixed signed comparisons
+     will get you.  */
+  int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
+			   unsigned long /*taddr*/, char * /*buf*/,
+			   int /*bytes*/));
+  int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
+			    unsigned long /*taddr*/, const char * /*buf*/,
+			    int /*bytes*/));
+
+  /* For sanity checking, should be last entry.  */
+  int magic;
+} CB_SYSCALL;
+
+/* Magic number sanity checker.  */
+#define CB_SYSCALL_MAGIC 0x12344321
+
+/* Macro to initialize CB_SYSCALL.  Called first, before filling in
+   any fields.  */
+#define CB_SYSCALL_INIT(sc) \
+do { \
+  memset ((sc), 0, sizeof (*(sc))); \
+  (sc)->magic = CB_SYSCALL_MAGIC; \
+} while (0)
+
+/* Return codes for various interface routines.  */
+
+typedef enum {
+  CB_RC_OK = 0,
+  /* generic error */
+  CB_RC_ERR,
+  /* either file not found or no read access */
+  CB_RC_ACCESS,
+  CB_RC_NO_MEM
+} CB_RC;
+
+/* Read in target values for system call numbers, errno values, signals.  */
+CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
+
+/* Translate target to host syscall function numbers.  */
+int cb_target_to_host_syscall PARAMS ((host_callback *, int));
+
+/* Translate host to target errno value.  */
+int cb_host_to_target_errno PARAMS ((host_callback *, int));
+
+/* Translate target to host open flags.  */
+int cb_target_to_host_open PARAMS ((host_callback *, int));
+
+/* Translate target signal number to host.  */
+int cb_target_to_host_signal PARAMS ((host_callback *, int));
+
+/* Translate host signal number to target.  */
+int cb_host_to_target_signal PARAMS ((host_callback *, int));
+
+/* Translate host stat struct to target.
+   If stat struct ptr is NULL, just compute target stat struct size.
+   Result is size of target stat struct or 0 if error.  */
+int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
+
+/* Perform a system call.  */
+CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
+
+#endif
Index: include/gdb/remote-sim.h
===================================================================
RCS file: include/gdb/remote-sim.h
diff -N include/gdb/remote-sim.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ include/gdb/remote-sim.h	9 Jun 2002 15:27:36 -0000
@@ -0,0 +1,354 @@
+/* This file defines the interface between the simulator and gdb.
+   Copyright 1993, 1994, 1996, 1997, 1998, 2000
+   Free Software Foundation, Inc.
+
+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 2 of the License, or
+(at your option) any later version.
+
+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.  */
+
+#if !defined (REMOTE_SIM_H)
+#define REMOTE_SIM_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This file is used when building stand-alone simulators, so isolate this
+   file from gdb.  */
+
+/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
+   gdb does (unsigned int - from defs.h).  */
+
+#ifndef CORE_ADDR_TYPE
+typedef unsigned int SIM_ADDR;
+#else
+typedef CORE_ADDR_TYPE SIM_ADDR;
+#endif
+
+
+/* Semi-opaque type used as result of sim_open and passed back to all
+   other routines.  "desc" is short for "descriptor".
+   It is up to each simulator to define `sim_state'.  */
+
+typedef struct sim_state *SIM_DESC;
+
+
+/* Values for `kind' arg to sim_open.  */
+
+typedef enum {
+  SIM_OPEN_STANDALONE, /* simulator used standalone (run.c) */
+  SIM_OPEN_DEBUG       /* simulator used by debugger (gdb) */
+} SIM_OPEN_KIND;
+
+
+/* Return codes from various functions.  */
+
+typedef enum {
+  SIM_RC_FAIL = 0,
+  SIM_RC_OK = 1,
+  SIM_RC_UNKNOWN_BREAKPOINT = 2,
+  SIM_RC_INSUFFICIENT_RESOURCES = 3,
+  SIM_RC_DUPLICATE_BREAKPOINT = 4
+} SIM_RC;
+
+
+/* The bfd struct, as an opaque type.  */
+
+struct _bfd;
+
+
+/* Main simulator entry points.  */
+
+
+/* Create a fully initialized simulator instance.
+
+   (This function is called when the simulator is selected from the
+   gdb command line.)
+
+   KIND specifies how the simulator shall be used.  Currently there
+   are only two kinds: stand-alone and debug.
+
+   CALLBACK specifies a standard host callback (defined in callback.h).
+
+   ABFD, when non NULL, designates a target program.  The program is
+   not loaded.
+
+   ARGV is a standard ARGV pointer such as that passed from the
+   command line.  The syntax of the argument list is is assumed to be
+   ``SIM-PROG { SIM-OPTION } [ TARGET-PROGRAM { TARGET-OPTION } ]''.
+   The trailing TARGET-PROGRAM and args are only valid for a
+   stand-alone simulator.
+
+   On success, the result is a non NULL descriptor that shall be
+   passed to the other sim_foo functions.  While the simulator
+   configuration can be parameterized by (in decreasing precedence)
+   ARGV's SIM-OPTION, ARGV's TARGET-PROGRAM and the ABFD argument, the
+   successful creation of the simulator shall not dependent on the
+   presence of any of these arguments/options.
+
+   Hardware simulator: The created simulator shall be sufficiently
+   initialized to handle, with out restrictions any client requests
+   (including memory reads/writes, register fetch/stores and a
+   resume).
+
+   Process simulator: that process is not created until a call to
+   sim_create_inferior.  FIXME: What should the state of the simulator
+   be? */
+
+SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct _bfd *abfd, char **argv));
+
+
+/* Destory a simulator instance.
+
+   QUITTING is non-zero if we cannot hang on errors.
+
+   This may involve freeing target memory and closing any open files
+   and mmap'd areas.  You cannot assume sim_kill has already been
+   called. */
+
+void sim_close PARAMS ((SIM_DESC sd, int quitting));
+
+
+/* Load program PROG into the simulators memory.
+
+   If ABFD is non-NULL, the bfd for the file has already been opened.
+   The result is a return code indicating success.
+
+   Hardware simulator: Normally, each program section is written into
+   memory according to that sections LMA using physical (direct)
+   addressing.  The exception being systems, such as PPC/CHRP, which
+   support more complicated program loaders.  A call to this function
+   should not effect the state of the processor registers.  Multiple
+   calls to this function are permitted and have an accumulative
+   effect.
+
+   Process simulator: Calls to this function may be ignored.
+
+   FIXME: Most hardware simulators load the image at the VMA using
+   virtual addressing.
+
+   FIXME: For some hardware targets, before a loaded program can be
+   executed, it requires the manipulation of VM registers and tables.
+   Such manipulation should probably (?) occure in
+   sim_create_inferior. */
+
+SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct _bfd *abfd, int from_tty));
+
+
+/* Prepare to run the simulated program.
+
+   ABFD, if not NULL, provides initial processor state information.
+   ARGV and ENV, if non NULL, are NULL terminated lists of pointers.
+
+   Hardware simulator: This function shall initialize the processor
+   registers to a known value.  The program counter and possibly stack
+   pointer shall be set using information obtained from ABFD (or
+   hardware reset defaults).  ARGV and ENV, dependant on the target
+   ABI, may be written to memory.
+
+   Process simulator: After a call to this function, a new process
+   instance shall exist. The TEXT, DATA, BSS and stack regions shall
+   all be initialized, ARGV and ENV shall be written to process
+   address space (according to the applicable ABI) and the program
+   counter and stack pointer set accordingly. */
+
+SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct _bfd *abfd, char **argv, char **env));
+
+
+/* Fetch LENGTH bytes of the simulated program's memory.  Start fetch
+   at virtual address MEM and store in BUF.  Result is number of bytes
+   read, or zero if error.  */
+
+int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
+
+
+/* Store LENGTH bytes from BUF into the simulated program's
+   memory. Store bytes starting at virtual address MEM. Result is
+   number of bytes write, or zero if error.  */
+
+int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
+
+
+/* Fetch register REGNO storing its raw (target endian) value in the
+   LENGTH byte buffer BUF.  Return the actual size of the register or
+   zero if REGNO is not applicable.
+
+   Legacy implementations ignore LENGTH and always return -1.
+
+   If LENGTH does not match the size of REGNO no data is transfered
+   (the actual register size is still returned). */
+
+int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
+
+
+/* Store register REGNO from the raw (target endian) value in BUF.
+   Return the actual size of the register or zero if REGNO is not
+   applicable.
+
+   Legacy implementations ignore LENGTH and always return -1.
+
+   If LENGTH does not match the size of REGNO no data is transfered
+   (the actual register size is still returned). */
+
+int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
+
+
+/* Print whatever statistics the simulator has collected.
+
+   VERBOSE is currently unused and must always be zero.  */
+
+void sim_info PARAMS ((SIM_DESC sd, int verbose));
+
+
+/* Run (or resume) the simulated program.
+
+   STEP, when non-zero indicates that only a single simulator cycle
+   should be emulated.
+
+   SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
+   event (hardware interrupt, signal) to be delivered to the simulated
+   program.
+
+   Hardware simulator: If the SIGRC value returned by
+   sim_stop_reason() is passed back to the simulator via SIGGNAL then
+   the hardware simulator shall correctly deliver the hardware event
+   indicated by that signal.  If a value of zero is passed in then the
+   simulation will continue as if there were no outstanding signal.
+   The effect of any other SIGGNAL value is is implementation
+   dependant.
+
+   Process simulator: If SIGRC is non-zero then the corresponding
+   signal is delivered to the simulated program and execution is then
+   continued.  A zero SIGRC value indicates that the program should
+   continue as normal. */
+
+void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
+
+
+/* Asynchronous request to stop the simulation.
+   A nonzero return indicates that the simulator is able to handle
+   the request */
+
+int sim_stop PARAMS ((SIM_DESC sd));
+
+
+/* Fetch the REASON why the program stopped.
+
+   SIM_EXITED: The program has terminated. SIGRC indicates the target
+   dependant exit status.
+
+   SIM_STOPPED: The program has stopped.  SIGRC uses the host's signal
+   numbering as a way of identifying the reaon: program interrupted by
+   user via a sim_stop request (SIGINT); a breakpoint instruction
+   (SIGTRAP); a completed single step (SIGTRAP); an internal error
+   condition (SIGABRT); an illegal instruction (SIGILL); Access to an
+   undefined memory region (SIGSEGV); Mis-aligned memory access
+   (SIGBUS).  For some signals information in addition to the signal
+   number may be retained by the simulator (e.g. offending address),
+   that information is not directly accessable via this interface.
+
+   SIM_SIGNALLED: The program has been terminated by a signal. The
+   simulator has encountered target code that causes the the program
+   to exit with signal SIGRC.
+
+   SIM_RUNNING, SIM_POLLING: The return of one of these values
+   indicates a problem internal to the simulator. */
+
+enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
+
+void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc));
+
+
+/* Passthru for other commands that the simulator might support.
+   Simulators should be prepared to deal with any combination of NULL
+   or empty CMD. */
+
+void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
+
+/* Call these functions to set and clear breakpoints at ADDR. */
+
+SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
+SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
+SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
+
+/* These functions are used to enable and disable breakpoints. */
+
+SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
+SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
+SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
+SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
+
+
+/* Provide simulator with a default (global) host_callback_struct.
+   THIS PROCEDURE IS DEPRECIATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_set_callbacks PARAMS ((struct host_callback_struct *));
+
+
+/* Set the size of the simulator memory array.
+   THIS PROCEDURE IS DEPRECIATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_size PARAMS ((int i));
+
+
+/* Single-step simulator with tracing enabled.
+   THIS PROCEDURE IS DEPRECIATED.
+   THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
+   GDB and NRUN do not use this interface.
+   This procedure returns: ``0'' indicating that the simulator should
+   be continued using sim_trace() calls; ``1'' indicating that the
+   simulation has finished. */
+
+int sim_trace PARAMS ((SIM_DESC sd));
+
+
+/* Enable tracing.
+   THIS PROCEDURE IS DEPRECIATED.
+   GDB and NRUN do not use this interface.
+   This procedure returns: ``0'' indicating that the simulator should
+   be continued using sim_trace() calls; ``1'' indicating that the
+   simulation has finished. */
+
+void sim_set_trace PARAMS ((void));
+
+
+/* Configure the size of the profile buffer.
+   THIS PROCEDURE IS DEPRECIATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_set_profile_size PARAMS ((int n));
+
+
+/* Kill the running program.
+   THIS PROCEDURE IS DEPRECIATED.
+   GDB and NRUN do not use this interface.
+   This procedure will be replaced as part of the introduction of
+   multi-cpu simulators. */
+
+void sim_kill PARAMS ((SIM_DESC sd));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined (REMOTE_SIM_H) */
Index: sim/arm/armos.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armos.c,v
retrieving revision 1.15
diff -u -r1.15 armos.c
--- sim/arm/armos.c	27 May 2002 14:11:57 -0000	1.15
+++ sim/arm/armos.c	9 Jun 2002 15:27:37 -0000
@@ -83,7 +83,7 @@
 /* For RDIError_BreakpointReached.  */
 #include "dbg_rdi.h"
 
-#include "callback.h"
+#include "gdb/callback.h"
 extern host_callback *sim_callback;
 
 extern unsigned ARMul_OSInit       (ARMul_State *);
Index: sim/arm/wrapper.c
===================================================================
RCS file: /cvs/src/src/sim/arm/wrapper.c,v
retrieving revision 1.20
diff -u -r1.20 wrapper.c
--- sim/arm/wrapper.c	27 May 2002 14:12:00 -0000	1.20
+++ sim/arm/wrapper.c	9 Jun 2002 15:27:37 -0000
@@ -28,8 +28,8 @@
 #include <string.h>
 #include <bfd.h>
 #include <signal.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "armdefs.h"
 #include "armemu.h"
 #include "dbg_rdi.h"
Index: sim/common/Make-common.in
===================================================================
RCS file: /cvs/src/src/sim/common/Make-common.in,v
retrieving revision 1.6
diff -u -r1.6 Make-common.in
--- sim/common/Make-common.in	5 Jul 2001 13:51:26 -0000	1.6
+++ sim/common/Make-common.in	9 Jun 2002 15:27:39 -0000
@@ -248,6 +248,9 @@
 
 RUNTESTFLAGS =
 
+callback_h = $(srcroot)/include/gdb/callback.h
+remote_sim_h = $(srcroot)/include/gdb/remote-sim.h
+
 all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
 
 libsim.a: $(LIB_OBJS)
@@ -259,8 +262,7 @@
 	$(CC) $(ALL_CFLAGS) -o run$(EXEEXT) \
 	  $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
-run.o: $(srccom)/run.c config.h tconfig.h \
-	  $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h
+run.o: $(srccom)/run.c config.h tconfig.h $(remote_sim_h) $(callback_h)
 	$(CC) -c $(srccom)/run.c $(ALL_CFLAGS)
 
 # FIXME: Ideally, callback.o and friends live in a library outside of
@@ -268,12 +270,10 @@
 # devo/libremote because this directory would contain more than just
 # a library).
 
-callback.o: $(srccom)/callback.c config.h tconfig.h \
-	  $(srcroot)/include/callback.h targ-vals.h
+callback.o: $(srccom)/callback.c config.h tconfig.h $(callback_h) targ-vals.h
 	$(CC) -c $(srccom)/callback.c $(ALL_CFLAGS)
 
-syscall.o: $(srccom)/syscall.c config.h tconfig.h \
-	  $(srcroot)/include/callback.h targ-vals.h
+syscall.o: $(srccom)/syscall.c config.h tconfig.h $(callback_h) targ-vals.h
 	$(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS)
 
 targ-map.o: targ-map.c targ-vals.h
@@ -399,21 +399,18 @@
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
 
-sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
 
-sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
 
 sim-hw.o: $(srccom)/sim-hw.c $(sim_main_headers)
 	$(CC) -c $(srccom)/sim-hw.c $(ALL_CFLAGS)
 
-sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS)
 
@@ -423,8 +420,8 @@
 	cat $(srccom)/$@ >> tmp-$@
 	$(SHELL) $(srcdir)/../../move-if-change tmp-$@ $@
 
-sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) \
-	  $(srcroot)/include/remote-sim.h targ-vals.h
+sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) $(remote_sim_h) \
+	  targ-vals.h
 	$(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
 
 sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
@@ -439,16 +436,13 @@
 	  $(sim-options_h) $(sim-io_h)
 	$(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
 
-sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
 
-sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-reg.c $(ALL_CFLAGS)
 
-sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
 
 sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
@@ -478,7 +472,7 @@
 sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
 	$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
 
-sim-load.o: $(srccom)/sim-load.c $(srcroot)/include/callback.h
+sim-load.o: $(srccom)/sim-load.c $(callback_h)
 	$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
 
 sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
@@ -547,8 +541,7 @@
 	$(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS)
 
 
-nrun.o: $(srccom)/nrun.c config.h tconfig.h \
-	  $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h \
+nrun.o: $(srccom)/nrun.c config.h tconfig.h $(remote_sim_h) $(callback_h) \
 	  $(sim_main_headers)
 	$(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
 
@@ -685,7 +678,7 @@
 	$(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
 		$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
 		$(arch) "$(FLAGS)" ignored "$(isa)" $(mach) ignored ignored
-	
+
 cgen-cpu: force
 	$(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
 		$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
Index: sim/common/callback.c
===================================================================
RCS file: /cvs/src/src/sim/common/callback.c,v
retrieving revision 1.4
diff -u -r1.4 callback.c
--- sim/common/callback.c	1 May 2002 23:26:31 -0000	1.4
+++ sim/common/callback.c	9 Jun 2002 15:27:39 -0000
@@ -46,7 +46,7 @@
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
 #include "targ-vals.h"
 
 #ifdef HAVE_UNISTD_H
Index: sim/common/gentmap.c
===================================================================
RCS file: /cvs/src/src/sim/common/gentmap.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gentmap.c
--- sim/common/gentmap.c	16 Apr 1999 01:34:56 -0000	1.1.1.1
+++ sim/common/gentmap.c	9 Jun 2002 15:27:39 -0000
@@ -68,7 +68,7 @@
   printf ("#include <errno.h>\n");
   printf ("#include <fcntl.h>\n");
   printf ("#include \"ansidecl.h\"\n");
-  printf ("#include \"callback.h\"\n");
+  printf ("#include \"gdb/callback.h\"\n");
   printf ("#include \"targ-vals.h\"\n");
   printf ("\n");
 
Index: sim/common/run.c
===================================================================
RCS file: /cvs/src/src/sim/common/run.c,v
retrieving revision 1.10
diff -u -r1.10 run.c
--- sim/common/run.c	31 May 2002 02:17:26 -0000	1.10
+++ sim/common/run.c	9 Jun 2002 15:27:40 -0000
@@ -43,8 +43,8 @@
 
 #include "libiberty.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "ansidecl.h"
 #include "run-sim.h"
 
Index: sim/common/sim-basics.h
===================================================================
RCS file: /cvs/src/src/sim/common/sim-basics.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sim-basics.h
--- sim/common/sim-basics.h	16 Apr 1999 01:34:57 -0000	1.1.1.1
+++ sim/common/sim-basics.h	9 Jun 2002 15:27:40 -0000
@@ -132,8 +132,8 @@
 #endif
 
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "sim-config.h"
 
Index: sim/common/sim-load.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-load.c,v
retrieving revision 1.4
diff -u -r1.4 sim-load.c
--- sim/common/sim-load.c	25 Apr 2001 21:14:28 -0000	1.4
+++ sim/common/sim-load.c	9 Jun 2002 15:27:40 -0000
@@ -36,8 +36,8 @@
 #include "bfd.h"
 #include "sim-utils.h"
 
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 static void eprintf PARAMS ((host_callback *, const char *, ...));
 static void xprintf PARAMS ((host_callback *, const char *, ...));
Index: sim/common/syscall.c
===================================================================
RCS file: /cvs/src/src/sim/common/syscall.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 syscall.c
--- sim/common/syscall.c	16 Apr 1999 01:34:59 -0000	1.1.1.1
+++ sim/common/syscall.c	9 Jun 2002 15:27:40 -0000
@@ -46,7 +46,7 @@
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
 #include "targ-vals.h"
 
 #ifndef ENOSYS
Index: sim/d10v/Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/d10v/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- sim/d10v/Makefile.in	24 May 2002 00:12:16 -0000	1.4
+++ sim/d10v/Makefile.in	9 Jun 2002 15:27:40 -0000
@@ -22,7 +22,7 @@
 SIM_EXTRA_CLEAN = clean-extra
 SIM_EXTRA_CFLAGS = -DNEED_UI_LOOP_HOOK -DSIM_HAVE_ENVIRONMENT
 
-INCLUDE = d10v_sim.h $(srcroot)/include/callback.h targ-vals.h endian.c \
+INCLUDE = d10v_sim.h $(srcroot)/include/gdb/callback.h targ-vals.h endian.c \
 	$(srcroot)/include/gdb/sim-d10v.h
 
 # This selects the d10v newlib/libgloss syscall definitions.
Index: sim/d10v/d10v_sim.h
===================================================================
RCS file: /cvs/src/src/sim/d10v/d10v_sim.h,v
retrieving revision 1.3
diff -u -r1.3 d10v_sim.h
--- sim/d10v/d10v_sim.h	3 Jun 2002 00:36:02 -0000	1.3
+++ sim/d10v/d10v_sim.h	9 Jun 2002 15:27:40 -0000
@@ -3,7 +3,7 @@
 #include <ctype.h>
 #include <limits.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/d10v.h"
 #include "bfd.h"
 
@@ -21,7 +21,7 @@
 
 extern int d10v_debug;
 
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 #include "sim-config.h"
 #include "sim-types.h"
 
Index: sim/d10v/gencode.c
===================================================================
RCS file: /cvs/src/src/sim/d10v/gencode.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gencode.c
--- sim/d10v/gencode.c	16 Apr 1999 01:35:00 -0000	1.1.1.1
+++ sim/d10v/gencode.c	9 Jun 2002 15:27:41 -0000
@@ -3,7 +3,6 @@
 #include <ctype.h>
 #include <limits.h>
 #include "ansidecl.h"
-#include "callback.h"
 #include "opcode/d10v.h"
 
 static void write_header PARAMS ((void));
Index: sim/d10v/interp.c
===================================================================
RCS file: /cvs/src/src/sim/d10v/interp.c,v
retrieving revision 1.10
diff -u -r1.10 interp.c
--- sim/d10v/interp.c	8 Jun 2002 22:19:56 -0000	1.10
+++ sim/d10v/interp.c	9 Jun 2002 15:27:41 -0000
@@ -1,8 +1,8 @@
 #include <signal.h>
 #include "sysdep.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "d10v_sim.h"
 #include "gdb/sim-d10v.h"
Index: sim/erc32/interf.c
===================================================================
RCS file: /cvs/src/src/sim/erc32/interf.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 interf.c
--- sim/erc32/interf.c	16 Apr 1999 01:35:00 -0000	1.1.1.1
+++ sim/erc32/interf.c	9 Jun 2002 15:27:41 -0000
@@ -31,7 +31,7 @@
 #include <dis-asm.h>
 #include "sim-config.h"
 
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef fprintf
 extern          fprintf();
Index: sim/erc32/sis.h
===================================================================
RCS file: /cvs/src/src/sim/erc32/sis.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sis.h
--- sim/erc32/sis.h	16 Apr 1999 01:35:00 -0000	1.1.1.1
+++ sim/erc32/sis.h	9 Jun 2002 15:27:41 -0000
@@ -21,8 +21,8 @@
  */
 
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "end.h"
 
Index: sim/h8300/compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.15
diff -u -r1.15 compile.c
--- sim/h8300/compile.c	19 May 2002 12:52:54 -0000	1.15
+++ sim/h8300/compile.c	9 Jun 2002 15:27:42 -0000
@@ -32,8 +32,8 @@
 #endif
 #include "ansidecl.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #ifndef SIGTRAP
 # define SIGTRAP 5
Index: sim/h8500/compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8500/compile.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 compile.c
--- sim/h8500/compile.c	16 Apr 1999 01:35:02 -0000	1.1.1.1
+++ sim/h8500/compile.c	9 Jun 2002 15:27:43 -0000
@@ -31,8 +31,8 @@
 #include <setjmp.h>
 #include "ansidecl.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #define O_RECOMPILE 85
 #define DEFINE_TABLE
Index: sim/m68hc11/Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/m68hc11/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- sim/m68hc11/Makefile.in	22 Jul 2001 12:33:58 -0000	1.4
+++ sim/m68hc11/Makefile.in	9 Jun 2002 15:27:43 -0000
@@ -42,7 +42,7 @@
 
 SIM_EXTRA_OBJS = @m68hc11_extra_objs@
 
-INCLUDE = $(srcdir)/../../include/callback.h \
+INCLUDE = $(srcdir)/../../include/gdb/callback.h \
 	  interrupts.h sim-main.h
 
 
Index: sim/m68hc11/sim-main.h
===================================================================
RCS file: /cvs/src/src/sim/m68hc11/sim-main.h,v
retrieving revision 1.7
diff -u -r1.7 sim-main.h
--- sim/m68hc11/sim-main.h	7 Mar 2002 19:12:44 -0000	1.7
+++ sim/m68hc11/sim-main.h	9 Jun 2002 15:27:43 -0000
@@ -36,8 +36,8 @@
 
 #include "opcode/m68hc11.h"
 
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "opcode/m68hc11.h"
 #include "sim-types.h"
 
Index: sim/mcore/interp.c
===================================================================
RCS file: /cvs/src/src/sim/mcore/interp.c,v
retrieving revision 1.4
diff -u -r1.4 interp.c
--- sim/mcore/interp.c	2 Mar 2000 22:42:51 -0000	1.4
+++ sim/mcore/interp.c	9 Jun 2002 15:27:44 -0000
@@ -24,9 +24,9 @@
 #include <sys/param.h>
 #include <netinet/in.h>	/* for byte ordering macros */
 #include "bfd.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "libiberty.h"
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef NUM_ELEM
 #define NUM_ELEM(A) (sizeof (A) / sizeof (A)[0])
Index: sim/mips/interp.c
===================================================================
RCS file: /cvs/src/src/sim/mips/interp.c,v
retrieving revision 1.15
diff -u -r1.15 interp.c
--- sim/mips/interp.c	4 Jun 2002 22:38:41 -0000	1.15
+++ sim/mips/interp.c	9 Jun 2002 15:27:46 -0000
@@ -61,8 +61,8 @@
 #include "getopt.h"
 #include "libiberty.h"
 #include "bfd.h"
-#include "callback.h"   /* GDB simulator callback interface */
-#include "remote-sim.h" /* GDB simulator interface */
+#include "gdb/callback.h"   /* GDB simulator callback interface */
+#include "gdb/remote-sim.h" /* GDB simulator interface */
 
 #include "sysdep.h"
 
Index: sim/mn10200/Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/mn10200/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- sim/mn10200/Makefile.in	15 Apr 2001 19:57:09 -0000	1.2
+++ sim/mn10200/Makefile.in	9 Jun 2002 15:27:46 -0000
@@ -25,7 +25,7 @@
 # Select mn10200 support in nltvals.def.
 NL_TARGET = -DNL_TARGET_mn10200
 
-INCLUDE = mn10200_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10200_sim.h $(srcdir)/../../include/gdb/callback.h
 
 ## COMMON_POST_CONFIG_FRAG
 
Index: sim/mn10200/mn10200_sim.h
===================================================================
RCS file: /cvs/src/src/sim/mn10200/mn10200_sim.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mn10200_sim.h
--- sim/mn10200/mn10200_sim.h	16 Apr 1999 01:35:07 -0000	1.1.1.1
+++ sim/mn10200/mn10200_sim.h	9 Jun 2002 15:27:46 -0000
@@ -1,10 +1,10 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/mn10200.h"
 #include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef INLINE
 #ifdef __GNUC__
Index: sim/mn10300/Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/mn10300/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- sim/mn10300/Makefile.in	26 Apr 2001 19:23:16 -0000	1.4
+++ sim/mn10300/Makefile.in	9 Jun 2002 15:27:46 -0000
@@ -48,7 +48,7 @@
 # Select mn10300 support in nltvals.def.
 NL_TARGET = -DNL_TARGET_mn10300
 
-INCLUDE = mn10300_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10300_sim.h $(srcdir)/../../include/gdb/callback.h
 
 # List of extra flags to always pass to $(CC).
 SIM_EXTRA_CFLAGS = @sim_gen@ -DPOLL_QUIT_INTERVAL=0x20
Index: sim/mn10300/mn10300_sim.h
===================================================================
RCS file: /cvs/src/src/sim/mn10300/mn10300_sim.h,v
retrieving revision 1.2
diff -u -r1.2 mn10300_sim.h
--- sim/mn10300/mn10300_sim.h	18 May 2000 22:56:28 -0000	1.2
+++ sim/mn10300/mn10300_sim.h	9 Jun 2002 15:27:47 -0000
@@ -1,10 +1,10 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/mn10300.h"
 #include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 #include "bfd.h"
 
 #ifndef INLINE
Index: sim/mn10300/tconfig.in
===================================================================
RCS file: /cvs/src/src/sim/mn10300/tconfig.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tconfig.in
--- sim/mn10300/tconfig.in	16 Apr 1999 01:35:07 -0000	1.1.1.1
+++ sim/mn10300/tconfig.in	9 Jun 2002 15:27:47 -0000
@@ -2,8 +2,8 @@
 
 /* FIXME: This is unnecessarily necessary: */
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "sim-module.h"
 
 MODULE_INSTALL_FN dv_sockser_install;
Index: sim/ppc/main.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/main.c,v
retrieving revision 1.3
diff -u -r1.3 main.c
--- sim/ppc/main.c	4 Jan 2002 00:00:54 -0000	1.3
+++ sim/ppc/main.c	9 Jun 2002 15:27:48 -0000
@@ -31,8 +31,8 @@
 #include "events.h" /* FIXME: psim should provide the interface */
 
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
Index: sim/ppc/sim_calls.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/sim_calls.c,v
retrieving revision 1.4
diff -u -r1.4 sim_calls.c
--- sim/ppc/sim_calls.c	15 Apr 2002 16:32:55 -0000	1.4
+++ sim/ppc/sim_calls.c	9 Jun 2002 15:27:48 -0000
@@ -42,8 +42,8 @@
 
 #include "defs.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 /* Define the rate at which the simulator should poll the host
    for a quit. */
Index: sim/sh/interp.c
===================================================================
RCS file: /cvs/src/src/sim/sh/interp.c,v
retrieving revision 1.4
diff -u -r1.4 interp.c
--- sim/sh/interp.c	30 Jan 2001 23:03:56 -0000	1.4
+++ sim/sh/interp.c	9 Jun 2002 15:27:49 -0000
@@ -27,8 +27,8 @@
 
 #include "sysdep.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 /* This file is local - if newlib changes, then so should this.  */
 #include "syscall.h"
Index: sim/w65/interp.c
===================================================================
RCS file: /cvs/src/src/sim/w65/interp.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 interp.c
--- sim/w65/interp.c	16 Apr 1999 01:35:13 -0000	1.1.1.1
+++ sim/w65/interp.c	9 Jun 2002 15:27:50 -0000
@@ -33,8 +33,8 @@
 #endif
 #include <sys/param.h>
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "../../newlib/libc/sys/w65/sys/syscall.h"
 
 #include "interp.h"
Index: sim/z8k/iface.c
===================================================================
RCS file: /cvs/src/src/sim/z8k/iface.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 iface.c
--- sim/z8k/iface.c	16 Apr 1999 01:35:14 -0000	1.1.1.1
+++ sim/z8k/iface.c	9 Jun 2002 15:27:50 -0000
@@ -22,8 +22,8 @@
 #include "tm.h"
 #include "signal.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #ifndef NULL
 #define NULL 0
Index: sim/z8k/support.c
===================================================================
RCS file: /cvs/src/src/sim/z8k/support.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 support.c
--- sim/z8k/support.c	16 Apr 1999 01:35:14 -0000	1.1.1.1
+++ sim/z8k/support.c	9 Jun 2002 15:27:50 -0000
@@ -36,8 +36,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/param.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "syscall.h"
 
 static int get_now PARAMS ((void));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]