Following DJ Delorie's suggestion to use CONTEXT_DEBUG_REGISTERS, I tested the use of i386 debug registers to set hardware watchpoints. It works successfully on my Win2000 box here. But te are some annoying things, the most annoying is that an exception seems to be generated on read access of the watched area even if you only set a normal watchpoint (which should use a write-only debug feature). This results in lost of garbage written on output due to the fact that mention function is called for watchpoints even if the value remains unchanged and thus no stop is done... It is unclear to me if this is a bug in the breakpoint code or if i386 code should take care of this issue. To Eli: If you test this patch, that contains a call to i386_cleanup_dregs(), you can test the failure if you comment the call out... PS: the patch should be a Dos style text file, Eudora seems completely unable to send Unix style text file.... Hopefully this will not create other problems. 2001-11-28 Pierre Muller * win32-nat.c (CONTEXT_DEBUG_DR macro): Add use of CONTEXT_DEBUG_REGISTERS. (dr variable): New static array containing a local copy of debug registers. (debug_registers_changed): Non zero whenever the debug registers where changed and need to be written to inferior. (cygwin_set_dr, cygwin_set_dr7, cygwin_get_dr6): New functions used by i386-nat code. (thread_rec): Set dr array if id is the thread of current_event . (child_continue, child_resume): Change the debug registers for all threads if debug_registers_changed. * config/i386/cygwin.mh: Add use of i386-nat.o file. Link nm.h to new nm-cygwin.h file. + config/i386/nm-cygwin.h: New file. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99