From: Ulrich Weigand Date: Fri, 15 Jun 2007 22:28:52 +0000 (+0000) Subject: * mep-tdep.c (current_me_module): Read from current regcache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d1a74ac503db24fb7bb308ad40ed10a15ddd287;p=binutils-gdb.git * mep-tdep.c (current_me_module): Read from current regcache instead of calling read_register. (current_options): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6860ae9a02d..2bd14bf367b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2007-06-15 Ulrich Weigand + + * mep-tdep.c (current_me_module): Read from current regcache + instead of calling read_register. + (current_options): Likewise. + 2007-06-15 Ulrich Weigand * cris-tdep.c (cris_stopped_data_address): Read register values diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 632172eba96..0f1ec474fcc 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, ®val); + 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, ®val); + return regval; + } else return me_module_opt (current_me_module ()); }