Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] fix accounting of hw watchpoints on ppc
@ 2012-05-29 18:28 Edjunior Barbosa Machado
  2012-05-30 12:59 ` Jan Kratochvil
  0 siblings, 1 reply; 3+ messages in thread
From: Edjunior Barbosa Machado @ 2012-05-29 18:28 UTC (permalink / raw)
  To: gdb-patches

Hi,

this small patch fixes the checking of hardware watchpoints on ppc,
taking into account the different types of watches. With this change,
the following unexpected failures no longer happen:

FAIL: gdb.base/watch-read.exp: read watchpoint triggers when value doesn't change, trapping reads and writes
FAIL: gdb.base/watch-read.exp: only read watchpoint triggers when value doesn't change

Tested against ppc64/32, with no regressions found.

Ok to apply?

Thanks,
-- 
Edjunior Barbosa Machado
IBM Linux Technology Center

gdb/
2012-05-29  Edjunior Machado  <emachado@linux.vnet.ibm.com>

	* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): fix
	accounting of hw watchpoints on ppc.

diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 9bd11fd..b9e0c85 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1461,7 +1461,7 @@ ppc_linux_can_use_hw_breakpoint (int type, int cnt, int ot)
   if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
       || type == bp_access_watchpoint || type == bp_watchpoint)
     {
-      if (cnt > total_hw_wp)
+      if (cnt + ot > total_hw_wp)
 	return -1;
     }
   else if (type == bp_hardware_breakpoint)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix accounting of hw watchpoints on ppc
  2012-05-29 18:28 [PATCH] fix accounting of hw watchpoints on ppc Edjunior Barbosa Machado
@ 2012-05-30 12:59 ` Jan Kratochvil
  2012-05-30 13:45   ` Edjunior Barbosa Machado
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2012-05-30 12:59 UTC (permalink / raw)
  To: Edjunior Barbosa Machado; +Cc: gdb-patches

On Tue, 29 May 2012 20:26:59 +0200, Edjunior Barbosa Machado wrote:
> FAIL: gdb.base/watch-read.exp: read watchpoint triggers when value doesn't change, trapping reads and writes
> FAIL: gdb.base/watch-read.exp: only read watchpoint triggers when value doesn't change
> 
> Tested against ppc64/32, with no regressions found.
> 
> Ok to apply?

Yes, I find it as an improvement.  Still fixing this whole watchpointing
interface is another issue.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix accounting of hw watchpoints on ppc
  2012-05-30 12:59 ` Jan Kratochvil
@ 2012-05-30 13:45   ` Edjunior Barbosa Machado
  0 siblings, 0 replies; 3+ messages in thread
From: Edjunior Barbosa Machado @ 2012-05-30 13:45 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

On 05/30/2012 09:59 AM, Jan Kratochvil wrote:

> On Tue, 29 May 2012 20:26:59 +0200, Edjunior Barbosa Machado wrote:
>> FAIL: gdb.base/watch-read.exp: read watchpoint triggers when value doesn't change, trapping reads and writes
>> FAIL: gdb.base/watch-read.exp: only read watchpoint triggers when value doesn't change
>>
>> Tested against ppc64/32, with no regressions found.
>>
>> Ok to apply?
> 
> Yes, I find it as an improvement.  Still fixing this whole watchpointing
> interface is another issue.


Checked in:
	http://sourceware.org/ml/gdb-cvs/2012-05/msg00211.html

Thanks,
-- 
Edjunior


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-30 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 18:28 [PATCH] fix accounting of hw watchpoints on ppc Edjunior Barbosa Machado
2012-05-30 12:59 ` Jan Kratochvil
2012-05-30 13:45   ` Edjunior Barbosa Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox