1 /* This file defines the interface between the simulator and gdb.
2 Copyright (C) 1993 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #if !defined (REMOTE_SIM_H)
21 #define REMOTE_SIM_H 1
23 /* Main simulator globals ... */
25 extern int sim_verbose
;
27 /* Main simulator entry points ...
29 All functions return 0 for success and non-zero for failure. */
31 /* Initialize the simulator. This function is called when the simulator
32 is selected from the command line. ARGS is passed from the command line
33 and can be used to select whatever run time options the simulator provides.
34 ARGS is the raw character string and must be parsed by the simulator. */
36 int sim_open
PARAMS ((char *name
));
38 /* Load program PROG into the simulator.
39 We use "void *" instead of "bfd *" to isolate this file from BFD. */
41 int sim_load
PARAMS ((void *bfd_handle
, char *args
));
43 /* Set the arguments and environment for the program loaded into the
44 simulator. ARGV and ENV are NULL terminated lists of pointers.
45 If the simulator doesn't support setting arguments, print an error message
46 and return non-zero. */
48 int sim_set_args
PARAMS ((char **argv
, char **env
));
50 /* Fetch register REGNO and store the raw value in BUF. */
52 int sim_fetch_register
PARAMS ((int regno
, char *buf
));
54 /* Store register REGNO from BUF (in raw format). */
56 int sim_store_register
PARAMS ((int regno
, char *buf
));
58 /* Kill the running program.
59 This may involve closing any open files and deleting any mmap'd areas. */
61 int sim_kill
PARAMS ((void));
63 /* Read LENGTH bytes of the simulated program's memory and store in BUF. */
65 int sim_read
PARAMS ((CORE_ADDR mem
, char *buf
, int length
));
67 /* Store LENGTH bytes from BUF in the simulated program's memory. */
69 int sim_write
PARAMS ((CORE_ADDR mem
, char *buf
, int length
));
71 /* Print some interesting information about the simulator. */
73 int sim_info
PARAMS ((void));
75 /* Set the simulated cpu's program counter to PC. */
77 int sim_set_pc
PARAMS ((CORE_ADDR pc
));
79 /* Fetch why the program stopped. */
81 int sim_stop_signal
PARAMS ((void));
83 /* Run (or resume) the program. */
85 int sim_resume
PARAMS ((int step
, int siggnal
));
87 #endif /* !defined (REMOTE_SIM_H) */
This page took 0.043892 seconds and 4 git commands to generate.