[RFA-v2] Fix a windows bug if two watchpoints are used

Eli Zaretskii eliz@gnu.org
Thu Jun 4 10:31:00 GMT 2009


> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Cc: <gdb-patches@sourceware.org>
> Date: Thu, 4 Jun 2009 09:33:06 +0200
> Content-Language: en-us
> 
>   My problem is indeed fixed without that part,
> but without my change to I386_DR_DISABLE, the second check
> in i386_stopped_data_address:
> 
>   ALL_DEBUG_REGISTERS(i)
>     {
>       if (I386_DR_WATCH_HIT (i)
> 	  /* This second condition makes sure DRi is set up for a data
> 	     watchpoint, not a hardware breakpoint.  The reason is
> 	     that GDB doesn't call the target_stopped_data_address
> 	     method except for data watchpoints.  In other words, I'm
> 	     being paranoiac.  */
> 	  && I386_DR_GET_RW_LEN (i) != 0)
> 
> is not reliable as the return value of I386_DR_GET_RW_LEN (i) 
> is non-zero if I was used before... Even if it was disabled
> later!

This is C: if the result of the first test is false, the result of the
second test is not important, right?

Or am I missing something?



More information about the Gdb-patches mailing list