This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Code in can_use_hardware_watchpoint()
- To: gdb@sourceware.cygnus.com
- Subject: Re: Code in can_use_hardware_watchpoint()
- From: Eli Zaretskii <eliz@gnu.org>
- Date: Sun, 15 Aug 1999 08:34:07 -0400
- CC: jtc@redback.com (J.T. Conklin)
- References: <5mu2q3jl6i.fsf@jtc.redbacknetworks.com>
From: jtc@redback.com (J.T. Conklin)
Date: 13 Aug 1999 16:49:25 -0700
> I believe the enclosed code from can_use_hardware_watchpoint() has a
> problem, but I'm unsure of the proper fix.
As long as we are talking about this function, here's another
question: shouldn't the loop below return zero as soon as the first
value is found on the value chain that is NOT okay to watch (as the
macro TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT says)?
for (; v; v = v->next)
{
if (v->lval == lval_memory)
{
if (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (TYPE_LENGTH (VALUE_TYPE (v))))
found_memory_cnt++;
}
else if (v->lval != not_lval && v->modifiable == 0)
return 0;
}