diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-20 13:32:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-20 13:32:34 +0000 |
commit | 601cecf016bc104dc20b12630be28d3a73767ba6 (patch) | |
tree | f178ead92957cc6cce09dcd2c34b0fa165ba2ba0 /sim/ppc/hw_register.c | |
parent | 8f3bab57754eb34346df536d6b7d5ec4a4255cbc (diff) | |
download | gdb-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/hw_register.c')
-rw-r--r-- | sim/ppc/hw_register.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sim/ppc/hw_register.c b/sim/ppc/hw_register.c index f361e46..549ecf9 100644 --- a/sim/ppc/hw_register.c +++ b/sim/ppc/hw_register.c @@ -1,6 +1,6 @@ /* This file is part of the program psim. - Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au> + Copyright 1994, 1995, 1996, 2003 Andrew Cagney 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 @@ -98,10 +98,11 @@ do_register_init(device *me, DTRACE(register, ("%d.%s=0x%lx\n", processor, name, (unsigned long)value)); } - psim_write_register(system, processor, /* all processors */ - &value, - name, - cooked_transfer); + if (psim_write_register(system, processor, /* all processors */ + &value, + name, + cooked_transfer) <= 0) + error("Invalid register name %s\n", name); } } |