aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-12 16:47:06 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-12 16:47:06 +0000
commit474c1661763ea406e7b76ba49718330a6b8ade94 (patch)
treec266e0b1b85517c1d9b00e47509e8f8c0c544291 /gdb/remote-sim.c
parentc7bb205ca90c54c3a99aa42dc9aa21872347690b (diff)
downloadgdb-474c1661763ea406e7b76ba49718330a6b8ade94.zip
gdb-474c1661763ea406e7b76ba49718330a6b8ade94.tar.gz
gdb-474c1661763ea406e7b76ba49718330a6b8ade94.tar.bz2
2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (REGISTER_SIM_REGNO): Replace by gdbarch_register_sim_regno. * sim-regno.h (sim_regno): Likewise (comment). * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register): Likewise. * gdbarch.c, gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 8c13888..48bb127 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -288,7 +288,7 @@ gdbsim_fetch_register (struct regcache *regcache, int regno)
return;
}
- switch (REGISTER_SIM_REGNO (regno))
+ switch (gdbarch_register_sim_regno (current_gdbarch, regno))
{
case LEGACY_SIM_REGNO_IGNORE:
break;
@@ -311,14 +311,18 @@ gdbsim_fetch_register (struct regcache *regcache, int regno)
gdb_assert (regno >= 0 && regno < gdbarch_num_regs (current_gdbarch));
memset (buf, 0, MAX_REGISTER_SIZE);
nr_bytes = sim_fetch_register (gdbsim_desc,
- REGISTER_SIM_REGNO (regno),
- buf, register_size (current_gdbarch, regno));
+ gdbarch_register_sim_regno
+ (current_gdbarch, regno),
+ buf,
+ register_size (current_gdbarch, regno));
if (nr_bytes > 0 && nr_bytes != register_size (current_gdbarch, regno) && warn_user)
{
fprintf_unfiltered (gdb_stderr,
"Size of register %s (%d/%d) incorrect (%d instead of %d))",
gdbarch_register_name (current_gdbarch, regno),
- regno, REGISTER_SIM_REGNO (regno),
+ regno,
+ gdbarch_register_sim_regno
+ (current_gdbarch, regno),
nr_bytes, register_size (current_gdbarch, regno));
warn_user = 0;
}
@@ -349,13 +353,14 @@ gdbsim_store_register (struct regcache *regcache, int regno)
gdbsim_store_register (regcache, regno);
return;
}
- else if (REGISTER_SIM_REGNO (regno) >= 0)
+ else if (gdbarch_register_sim_regno (current_gdbarch, regno) >= 0)
{
char tmp[MAX_REGISTER_SIZE];
int nr_bytes;
regcache_cooked_read (regcache, regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
- REGISTER_SIM_REGNO (regno),
+ gdbarch_register_sim_regno
+ (current_gdbarch, regno),
tmp, register_size (current_gdbarch, regno));
if (nr_bytes > 0 && nr_bytes != register_size (current_gdbarch, regno))
internal_error (__FILE__, __LINE__,