From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] fix accounting of hw watchpoints on ppc
Date: Tue, 29 May 2012 18:28:00 -0000 [thread overview]
Message-ID: <1338316019-12994-1-git-send-email-emachado@linux.vnet.ibm.com> (raw)
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)
next reply other threads:[~2012-05-29 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 18:28 Edjunior Barbosa Machado [this message]
2012-05-30 12:59 ` Jan Kratochvil
2012-05-30 13:45 ` Edjunior Barbosa Machado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338316019-12994-1-git-send-email-emachado@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox