]>
Commit | Line | Data |
---|---|---|
b562a186 DE |
1 | /* This file defines the interface between the simulator and gdb. |
2 | Copyright (C) 1993 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GDB. | |
5 | ||
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. | |
10 | ||
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. | |
15 | ||
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. */ | |
19 | ||
20 | #if !defined (REMOTE_SIM_H) | |
21 | #define REMOTE_SIM_H 1 | |
22 | ||
23 | /* Main simulator globals ... */ | |
24 | ||
25 | extern int sim_verbose; | |
26 | ||
27 | /* Main simulator entry points ... | |
28 | ||
29 | All functions return 0 for success and non-zero for failure. */ | |
30 | ||
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. | |
40b92220 JK |
34 | ARGS is the raw character string and must be parsed by the simulator. |
35 | ||
36 | Returns 0 for success, non-zero for failure (FIXME: how do we say what | |
37 | kind of failure it was?). */ | |
b562a186 DE |
38 | |
39 | int sim_open PARAMS ((char *name)); | |
40 | ||
41 | /* Load program PROG into the simulator. | |
42 | We use "void *" instead of "bfd *" to isolate this file from BFD. */ | |
43 | ||
44 | int sim_load PARAMS ((void *bfd_handle, char *args)); | |
45 | ||
46 | /* Set the arguments and environment for the program loaded into the | |
47 | simulator. ARGV and ENV are NULL terminated lists of pointers. | |
48 | If the simulator doesn't support setting arguments, print an error message | |
49 | and return non-zero. */ | |
50 | ||
51 | int sim_set_args PARAMS ((char **argv, char **env)); | |
52 | ||
53 | /* Fetch register REGNO and store the raw value in BUF. */ | |
54 | ||
55 | int sim_fetch_register PARAMS ((int regno, char *buf)); | |
56 | ||
57 | /* Store register REGNO from BUF (in raw format). */ | |
58 | ||
59 | int sim_store_register PARAMS ((int regno, char *buf)); | |
60 | ||
61 | /* Kill the running program. | |
62 | This may involve closing any open files and deleting any mmap'd areas. */ | |
63 | ||
64 | int sim_kill PARAMS ((void)); | |
65 | ||
66 | /* Read LENGTH bytes of the simulated program's memory and store in BUF. */ | |
67 | ||
68 | int sim_read PARAMS ((CORE_ADDR mem, char *buf, int length)); | |
69 | ||
70 | /* Store LENGTH bytes from BUF in the simulated program's memory. */ | |
71 | ||
72 | int sim_write PARAMS ((CORE_ADDR mem, char *buf, int length)); | |
73 | ||
74 | /* Print some interesting information about the simulator. */ | |
75 | ||
76 | int sim_info PARAMS ((void)); | |
77 | ||
78 | /* Set the simulated cpu's program counter to PC. */ | |
79 | ||
80 | int sim_set_pc PARAMS ((CORE_ADDR pc)); | |
81 | ||
82 | /* Fetch why the program stopped. */ | |
83 | ||
84 | int sim_stop_signal PARAMS ((void)); | |
85 | ||
86 | /* Run (or resume) the program. */ | |
87 | ||
88 | int sim_resume PARAMS ((int step, int siggnal)); | |
89 | ||
90 | #endif /* !defined (REMOTE_SIM_H) */ |