aboutsummaryrefslogtreecommitdiff
path: root/gdb/mep-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:28:52 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:28:52 +0000
commit3d1a74ac503db24fb7bb308ad40ed10a15ddd287 (patch)
tree45c9f79f252e950b8e06539317f52f60a7d246f5 /gdb/mep-tdep.c
parent1b5a9a8ffdbcdebae30ce7e30cd5dca63b54c8c0 (diff)
downloadgdb-3d1a74ac503db24fb7bb308ad40ed10a15ddd287.zip
gdb-3d1a74ac503db24fb7bb308ad40ed10a15ddd287.tar.gz
gdb-3d1a74ac503db24fb7bb308ad40ed10a15ddd287.tar.bz2
* mep-tdep.c (current_me_module): Read from current regcache
instead of calling read_register. (current_options): Likewise.
Diffstat (limited to 'gdb/mep-tdep.c')
-rw-r--r--gdb/mep-tdep.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 632172e..0f1ec47 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -850,7 +850,12 @@ static CONFIG_ATTR
current_me_module ()
{
if (target_has_registers)
- return read_register (MEP_MODULE_REGNUM);
+ {
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (current_regcache,
+ MEP_MODULE_REGNUM, &regval);
+ return regval;
+ }
else
return gdbarch_tdep (current_gdbarch)->me_module;
}
@@ -868,7 +873,12 @@ static unsigned int
current_options ()
{
if (target_has_registers)
- return read_register (MEP_OPT_REGNUM);
+ {
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (current_regcache,
+ MEP_OPT_REGNUM, &regval);
+ return regval;
+ }
else
return me_module_opt (current_me_module ());
}