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
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
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.
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "basics.h"
+#include "gdb/remote-sim.h"
/* the system object */
/* typedef struct _psim psim; */
extern char **psim_options
(device *root,
- char **argv);
+ char **argv,
+ SIM_OPEN_KIND kind);
extern void psim_command
(device *root,
const char *file_name);
extern void psim_usage
-(int verbose);
+(int verbose, int help, SIM_OPEN_KIND kind);
/* create a new simulator from the device tree */
-/* manipulate the state (registers or memory) of a processor within
+/* Manipulate the state (registers or memory) of a processor within
the system. In the case of memory, the read/write is performed
using the specified processors address translation tables.
Where applicable, WHICH_CPU == -1 indicates all processors and
- WHICH_CPU == <nr_cpus> indicates the `current' processor. */
+ WHICH_CPU == <nr_cpus> indicates the `current' processor.
+
+ The register functions return the size of the register, or 0 if the
+ register's name is not recognized. */
-extern void psim_read_register
+extern int psim_read_register
(psim *system,
int which_cpu,
void *host_ordered_buf,
const char reg[],
transfer_mode mode);
-extern void psim_write_register
+extern int psim_write_register
(psim *system,
int which_cpu,
const void *buf,