Re: recurse.exp: watch on local variable that goes out of scope

Eli Zaretskii
2004-07-22T19:19:36Z

> Date: Thu, 22 Jul 2004 11:44:09 +0200
> From: Orjan Friberg <orjan.friberg@axis.com>
>
> Breakpoint 4, i386_stopped_data_address () at ../../src/gdb/i386-nat.c:576
> 576 dr_status_mirror = I386_DR_LOW_GET_STATUS ();
>
> Inside i386_stopped_data_address dr_status_mirror = 0xffff4ff1, which satisfies
> the condition for I386_DR_WATCH_HIT (i) for i == 0. The reported address is
> 0xbffff488 (the address of local variable b).

So it sounds like your low-level target-side support misbehaves in
this case: I386_DR_LOW_GET_STATUS should map into a system call that
returns the contents of the DR6 debug register. If the returned value
says that one of the watched addresses was written to, there's nothing
GDB can do except report that and act accordingly.

> I fail to see why these two cases should be different.

Neither do I, but I'm not an expert for your target platform.