diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 11:46:46 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-05 11:46:46 +0000 |
commit | 60441ab9edac79737e5cd961caf351951f349c1a (patch) | |
tree | 99ae506f8d920efc34eac47161c6b4b7576b2bcb | |
parent | * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use (diff) | |
download | binutils-gdb-60441ab9edac79737e5cd961caf351951f349c1a.tar.gz binutils-gdb-60441ab9edac79737e5cd961caf351951f349c1a.tar.bz2 binutils-gdb-60441ab9edac79737e5cd961caf351951f349c1a.zip |
* nto-tdep.h (struct nto_target_ops): Add gdbarch parameter to
register_area callback function.
* i386-nto-tdep.c (i386nto_register_area): Add gdbarch parameter.
Use it instead of current_gdbarch.
* nto-procfs.c (procfs_store_registers): Update call.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/i386-nto-tdep.c | 6 | ||||
-rw-r--r-- | gdb/nto-procfs.c | 3 | ||||
-rw-r--r-- | gdb/nto-tdep.h | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 314a4739cf0..6d12caef9bd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com> + * nto-tdep.h (struct nto_target_ops): Add gdbarch parameter to + register_area callback function. + * i386-nto-tdep.c (i386nto_register_area): Add gdbarch parameter. + Use it instead of current_gdbarch. + * nto-procfs.c (procfs_store_registers): Update call. + +2008-09-05 Ulrich Weigand <uweigand@de.ibm.com> + * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use regcache architecture instead of current_gdbarch. diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 9b065a6c8f9..8e720e9d607 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -131,7 +131,8 @@ i386nto_regset_id (int regno) } static int -i386nto_register_area (int regno, int regset, unsigned *off) +i386nto_register_area (struct gdbarch *gdbarch, + int regno, int regset, unsigned *off) { int len; @@ -166,8 +167,7 @@ i386nto_register_area (int regno, int regset, unsigned *off) if (regno == -1) return regset_size; - *off = (regno - gdbarch_fp0_regnum (current_gdbarch)) - * regsize + off_adjust; + *off = (regno - gdbarch_fp0_regnum (gdbarch)) * regsize + off_adjust; return 10; /* Why 10 instead of regsize? GDB only stores 10 bytes per FP register so if we're sending a register back to the target, diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 028394bdd9b..23b76ce1b45 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -1194,7 +1194,8 @@ procfs_store_registers (struct regcache *regcache, int regno) if (dev_set == -1) return; - len = nto_register_area (regno, regset, &off); + len = nto_register_area (get_regcache_arch (regcache), + regno, regset, &off); if (len < 1) return; diff --git a/gdb/nto-tdep.h b/gdb/nto-tdep.h index 30be3c54857..567cbb64877 100644 --- a/gdb/nto-tdep.h +++ b/gdb/nto-tdep.h @@ -61,7 +61,7 @@ struct nto_target_ops and stuff it into the last argument. If regno is -1, calculate the size of the entire regset. Returns length of data, -1 if unknown regset, 0 if unknown register. */ - int (*register_area) (int, int, unsigned *); + int (*register_area) (struct gdbarch *, int, int, unsigned *); /* Build the Neutrino register set info into the data buffer. Return -1 if unknown regset, 0 otherwise. */ |