This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed/Darwin]: fix fetch of amd64 fpu registers


Hi,

this patch fixes a typo in i386-darwin-nat.c so that fpu registers are correctly supplied in amd64 case.

Tristan.

2009-10-22 Tristan Gingold <gingold@adacore.com>

	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Use
	amd64_supply_fxsave for amd64.  Fix the offset.
	(i386_darwin_store_inferior_registers): Use amd64_collect_fxsave
	for amd64.


*** i386-darwin-nat.c 3 Jul 2009 12:06:36 -0000 1.7 --- i386-darwin-nat.c 22 Oct 2009 12:41:32 -0000 *************** *** 40,45 **** --- 40,46 ----

  #ifdef BFD64
  #include "amd64-nat.h"
+ #include "amd64-tdep.h"
  #include "amd64-darwin-tdep.h"
  #endif

***************
*** 89,95 ****
printf_unfiltered (_("Error calling thread_get_state for float registers for thread 0x%ulx"), current_thread);
MACH_CHECK_ERROR (ret);
}
! i387_supply_fxsave (regcache, -1, &fp_regs.ufs.fs64);
fetched++;
}
}
--- 90,96 ----
printf_unfiltered (_("Error calling thread_get_state for float registers for thread 0x%ulx"), current_thread);
MACH_CHECK_ERROR (ret);
}
! amd64_supply_fxsave (regcache, -1, &fp_regs.ufs.fs64.__fpu_fcw);
fetched++;
}
}
***************
*** 194,200 ****
gdb_assert (fp_regs.fsh.flavor == x86_FLOAT_STATE64);
gdb_assert (fp_regs.fsh.count == x86_FLOAT_STATE64_COUNT);


! i387_collect_fxsave (regcache, regno, &fp_regs.ufs.fs64.__fpu_fcw);

  	  ret = thread_set_state (current_thread, x86_FLOAT_STATE,
  				  (thread_state_t) & fp_regs,
--- 195,201 ----
            gdb_assert (fp_regs.fsh.flavor == x86_FLOAT_STATE64);
            gdb_assert (fp_regs.fsh.count == x86_FLOAT_STATE64_COUNT);

! amd64_collect_fxsave (regcache, regno, &fp_regs.ufs.fs64.__fpu_fcw);

  	  ret = thread_set_state (current_thread, x86_FLOAT_STATE,
  				  (thread_state_t) & fp_regs,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]