2007-10-09 Markus Deuling <deuling@de.ibm.com>

* dbug-rom.c (dbug_supply_register): Use get_regcache_arch to get at
	the current architecture by regcache.
This commit is contained in:
Ulrich Weigand
2007-10-09 18:16:00 +00:00
parent d4f91178be
commit e76e7474e6
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-10-09 Markus Deuling <deuling@de.ibm.com>
* dbug-rom.c (dbug_supply_register): Use get_regcache_arch to get at
the current architecture by regcache.
2007-10-09 Markus Deuling <deuling@de.ibm.com> 2007-10-09 Markus Deuling <deuling@de.ibm.com>
* arch-utils.c (legacy_return_value): Replace current_gdbarch by * arch-utils.c (legacy_return_value): Replace current_gdbarch by

View File

@ -40,6 +40,7 @@ dbug_supply_register (struct regcache *regcache, char *regname,
int regnamelen, char *val, int vallen) int regnamelen, char *val, int vallen)
{ {
int regno; int regno;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
if (regnamelen != 2) if (regnamelen != 2)
return; return;
@ -49,12 +50,12 @@ dbug_supply_register (struct regcache *regcache, char *regname,
case 'S': case 'S':
if (regname[1] != 'R') if (regname[1] != 'R')
return; return;
regno = gdbarch_ps_regnum (current_gdbarch); regno = gdbarch_ps_regnum (gdbarch);
break; break;
case 'P': case 'P':
if (regname[1] != 'C') if (regname[1] != 'C')
return; return;
regno = gdbarch_pc_regnum (current_gdbarch); regno = gdbarch_pc_regnum (gdbarch);
break; break;
case 'D': case 'D':
if (regname[1] < '0' || regname[1] > '7') if (regname[1] < '0' || regname[1] > '7')