This is the mail archive of the 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]

src/gdb/gdbserver ChangeLog win32-i386-low.c

CVSROOT:	/cvs/src
Module name:	src
Changes by:	2011-11-07 14:45:09

Modified files:
	gdb/gdbserver  : ChangeLog win32-i386-low.c 

Log message:
	[gdbserver] Fix watchpoint support on Windows
	Watchpoint support doesn't work anymore when using gdbserver on Windows.
	They just never trigger.
	The problem comes from the fact that we always set the debug registers
	to zero, no matter what.  This in turn comes from the fact that we
	use i386_low_insert_watchpoint to compute the DR values:
	return i386_low_insert_watchpoint (&debug_reg_state,
	type, addr, len);
	This function saves the new values in debug_reg_state.  However,
	the values we actually use when setting the DR registers are
	taken from two different globals:
	static unsigned dr_status_mirror;
	static unsigned dr_control_mirror;
	These are really never actually changed (their value is set from
	the DR values read from the inferior, but since we never change
	them, in practice, they never change).
	The fix is to use the values provided by debug_reg_state, and
	to eliminate the two dr_[...] globals.
	* win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
	(i386_dr_low_get_control, i386_dr_low_get_status): Use
	dr_status_mirror and dr_control_mirror from debug_reg_state.
	(i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
	(i386_initial_stuff): Remove use of deleted globals.
	(i386_get_thread_context, i386_set_thread_context,
	i386_thread_added): Use dr_status_mirror and dr_control_mirror
	from debug_reg_state.


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