]>
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. | |
34 | ARGS is the raw character string and must be parsed by the simulator. */ | |
35 | ||
36 | int sim_open PARAMS ((char *name)); | |
37 | ||
38 | /* Load program PROG into the simulator. | |
39 | We use "void *" instead of "bfd *" to isolate this file from BFD. */ | |
40 | ||
41 | int sim_load PARAMS ((void *bfd_handle, char *args)); | |
42 | ||
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. */ | |
47 | ||
48 | int sim_set_args PARAMS ((char **argv, char **env)); | |
49 | ||
50 | /* Fetch register REGNO and store the raw value in BUF. */ | |
51 | ||
52 | int sim_fetch_register PARAMS ((int regno, char *buf)); | |
53 | ||
54 | /* Store register REGNO from BUF (in raw format). */ | |
55 | ||
56 | int sim_store_register PARAMS ((int regno, char *buf)); | |
57 | ||
58 | /* Kill the running program. | |
59 | This may involve closing any open files and deleting any mmap'd areas. */ | |
60 | ||
61 | int sim_kill PARAMS ((void)); | |
62 | ||
63 | /* Read LENGTH bytes of the simulated program's memory and store in BUF. */ | |
64 | ||
65 | int sim_read PARAMS ((CORE_ADDR mem, char *buf, int length)); | |
66 | ||
67 | /* Store LENGTH bytes from BUF in the simulated program's memory. */ | |
68 | ||
69 | int sim_write PARAMS ((CORE_ADDR mem, char *buf, int length)); | |
70 | ||
71 | /* Print some interesting information about the simulator. */ | |
72 | ||
73 | int sim_info PARAMS ((void)); | |
74 | ||
75 | /* Set the simulated cpu's program counter to PC. */ | |
76 | ||
77 | int sim_set_pc PARAMS ((CORE_ADDR pc)); | |
78 | ||
79 | /* Fetch why the program stopped. */ | |
80 | ||
81 | int sim_stop_signal PARAMS ((void)); | |
82 | ||
83 | /* Run (or resume) the program. */ | |
84 | ||
85 | int sim_resume PARAMS ((int step, int siggnal)); | |
86 | ||
87 | #endif /* !defined (REMOTE_SIM_H) */ |