This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Fix a windows bug if two watchpoints are used
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 03 Jun 2009 19:21:21 -0400
- Subject: Re: [RFA] Fix a windows bug if two watchpoints are used
- References: <firstname.lastname@example.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: "Pierre Muller" <email@example.com>
> Date: Thu, 4 Jun 2009 00:58:09 +0200
> Now comes the tricky part, why does that generate a
> In i386_stopped_data_address,
> the bits of dr_status_mirror (copied from current value of dr)
> are checked from 0 to 3, but if hit is found for I,
> the address value is taken from dr_mirror array.
> Thus, according to dr, both debug registers 0 and 1
> have been hit.
> at i=0, the correct address of ival3 is found in dr_mirror,
> but after for i=1, the value of dr_mirror is used, but this
> value is 0, as only one watch is active.
Shouldn't we instead fix the logic of i386_stopped_data_address, to
get out of the loop on the first watchpoint that is found to be hit?
The function does not support more than one watchpoint anyway, so why
continue checking the bits in dr after we've found one set already?
Would such a change fix your problem without the other complications?
Btw, I don't understand this part of i386_stopped_data_address:
if (maint_show_dr && addr == 0)
i386_show_dr ("stopped_data_addr", 0, 0, hw_write);
Isn't that backwards? why display the address if it is zero?