diff options
author | Markus Deuling <deuling@de.ibm.com> | 2008-03-11 05:21:38 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2008-03-11 05:21:38 +0000 |
commit | 20a6ec495b38548cc88165e7c18203d6d387d55d (patch) | |
tree | b7cd82da0005270ffc124fc9a86df24e57a96f1c /gdb/windows-nat.c | |
parent | dd2c76da5595b0a7c60acc52328955e0b847fcaf (diff) | |
download | fsf-binutils-gdb-20a6ec495b38548cc88165e7c18203d6d387d55d.zip fsf-binutils-gdb-20a6ec495b38548cc88165e7c18203d6d387d55d.tar.gz fsf-binutils-gdb-20a6ec495b38548cc88165e7c18203d6d387d55d.tar.bz2 |
* win32-nat.c (do_win32_fetch_inferior_registers): Use get_regcache_arch
to get at the current architecture and at the target specific vector.
Add target specific vector to I387_FISEG_REGNUM and I387_FOP_REGNUM and
remove define of I387_ST0_REGNUM.
* amd64-tdep.c (I387_ST0_REGNUM): Remove define.
(amd64_supply_fxsave, amd64_collect_fxsave): Use get_regcache_arch to
get at the current architecture
(I387_FISEG_REGNUM, I387_FOSEG_REGNUM): Add target specific vector as
parameter.
* i386-tdep.c: Remove various define's and undef's of I387_ST0_REGNUM,
I387_NUM_XMM_REGS and I387_MM0_REGNUM.
(I387_NUM_XMM_REGS, I387_XMM0_REGNUM, I387_MXCSR_REGNUM,
I387_ST0_REGNUM, I387_FCTRL_REGNUM, I387_MM0_REGNUM,
(I387_FSTAT_REGNUM): Add target specific vector as parameter.
(i386_register_name, i386_dbx_reg_to_regnum): Use gdbarch_tdep to get
at the target specific vector.
(i386_get_longjmp_target): Use get_frame_arch to get at the current
architecture. Use gdbarch_tdep to get at the target specific vector.
(i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as parameter and
update caller. Use gdbarch_tdep to get at the target specific vector.
(i386_register_to_value: Use get_frame_arch to get at the current
architecture.
* i386-tdep.h (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as
parameter.
* i387-tdep.c (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM
I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_ST0_REGNUM, FSAVE_ADDR,
FXSAVE_ADDR, I387_XMM0_REGNUM): Add target specific vector as parameter.
(I387_ST0_REGNUM, I387_NUM_XMM_REGS): Remove various define's and
undef's.
(i387_convert_register_p, i387_register_to_value,
i387_value_to_register): Update call for i386_fp_regnum_p.
* i387-tdep.h: Remove comment.
(I387_ST0_REGNUM, I387_NUM_XMM_REGS, I387_MM0_REGNUM): Add define.
(I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM,
I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_XMM0_REGNUM,
I387_MXCSR_REGNUM): Add target specific vector as parameter.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 48d07e4..d597b69 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -359,6 +359,8 @@ static void do_win32_fetch_inferior_registers (struct regcache *regcache, int r) { char *context_offset = ((char *) ¤t_thread->context) + mappings[r]; + struct gdbarch *gdbarch = get_regcache_arch (regcache); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); long l; if (!current_thread) @@ -397,14 +399,12 @@ do_win32_fetch_inferior_registers (struct regcache *regcache, int r) current_thread->reload_context = 0; } -#define I387_ST0_REGNUM I386_ST0_REGNUM - - if (r == I387_FISEG_REGNUM) + if (r == I387_FISEG_REGNUM (tdep)) { l = *((long *) context_offset) & 0xffff; regcache_raw_supply (regcache, r, (char *) &l); } - else if (r == I387_FOP_REGNUM) + else if (r == I387_FOP_REGNUM (tdep)) { l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1); regcache_raw_supply (regcache, r, (char *) &l); @@ -413,11 +413,9 @@ do_win32_fetch_inferior_registers (struct regcache *regcache, int r) regcache_raw_supply (regcache, r, context_offset); else { - for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++) + for (r = 0; r < gdbarch_num_regs (gdbarch); r++) do_win32_fetch_inferior_registers (regcache, r); } - -#undef I387_ST0_REGNUM } static void |