aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/psim.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-20 13:32:34 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-20 13:32:34 +0000
commit601cecf016bc104dc20b12630be28d3a73767ba6 (patch)
treef178ead92957cc6cce09dcd2c34b0fa165ba2ba0 /sim/ppc/psim.h
parent8f3bab57754eb34346df536d6b7d5ec4a4255cbc (diff)
downloadgdb-601cecf016bc104dc20b12630be28d3a73767ba6.zip
gdb-601cecf016bc104dc20b12630be28d3a73767ba6.tar.gz
gdb-601cecf016bc104dc20b12630be28d3a73767ba6.tar.bz2
2003-06-20 Andrew Cagney <cagney@redhat.com>
* sim_calls.c (sim_create_inferior): Assert that psim_write_register succeeded. (sim_fetch_register, sim_store_register): Make "regname" constant. Delete Altivec hack. Return result from psim_read_register / psim_write_register. * psim.h (psim_read_register, psim_write_register): Change return type to int. Update comments. * psim.c: Update copyright. (psim_stack): Assert that the psim_read_register worked. (psim_read_register, psim_read_register): Return the register's size. Allocate the cooked buffer dynamically. * hw_register.c: Update copyright. (do_register_init): Check that psim_write_register succeeded. * hw_init.c: Update copyright. (create_ppc_elf_stack_frame, create_ppc_aix_stack_frame): Assert that the register transfer worked.
Diffstat (limited to 'sim/ppc/psim.h')
-rw-r--r--sim/ppc/psim.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sim/ppc/psim.h b/sim/ppc/psim.h
index f0cf3a5..8c1c920 100644
--- a/sim/ppc/psim.h
+++ b/sim/ppc/psim.h
@@ -138,21 +138,24 @@ extern event_queue *psim_event_queue
-/* 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.
-extern void psim_read_register
+ The register functions return the size of the register, or 0 if the
+ register's name is not recognized. */
+
+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,