Re: [PATCH 4/5] Move mips hardware watchpoint stuff to common/

Maciej W. Rozycki
2013-07-25T21:17:58Z

On Thu, 25 Jul 2013, Yao Qi wrote:

> OK, I keep <asm/ptrace.h> inclusion in the updated patch
> below. The functions order is fixed in the updated patch
> too.

Thanks. This shows the following changes that you made in the process of
moving the functions across. They are fine with me, but I prefer to have
them included with 3/5 where changes are supposed to be made, so please
move them there.

--- gdb/mips-linux-nat.c~ 2013-07-25 17:15:17.318692194 +0100
+++ gdb/common/mips-linux-watch.c 2013-07-25 17:15:32.318690373 +0100
@@ -627,10 +90,10 @@ mips_linux_watch_get_watchlo (struct pt_
}
}

-/* Assuming usable watch registers REGS, set VALUE to watchlo of
+/* Assuming usable watch registers REGS, set a watchlo VALUE of
register N. */

[...]
@@ -668,10 +131,10 @@ mips_linux_watch_get_watchhi (struct pt_
}
}

-/* Assuming usable watch registers REGS, set VALUE to watchhi of
+/* Assuming usable watch registers REGS, set a watchhi VALUE of
register N. */

[...]
fill_mask (CORE_ADDR mask)
{
CORE_ADDR f = 1;
+
while (f && f < mask)
{
mask |= f;

OK with this change, thanks.

[The wording of the function descriptions is a bit unfortunate, but
that's a preexisting problem, so you don't need to do anything about them
unless you want to (e.g. "[...] set watchlo of register N to VALUE." would
be better).]

Maciej