From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: uweigand@de.ibm.com
Subject: [PATCH] Report "No hardware breakpoint support" correctly
Date: Mon, 14 Jul 2014 14:55:00 -0000 [thread overview]
Message-ID: <1405349255-26782-1-git-send-email-emachado@linux.vnet.ibm.com> (raw)
Hi,
when trying to set a hardware breakpoint on Power server processors, gdb
currently reports "Hardware breakpoints used exceeds limit." when in fact
hbreaks are not supported. With this patch, gdb will report "No hardware
breakpoint support in the target.", which seems to be more appropriate in this
case.
This also fixes the several unexpected failures in
gdb.base/watchpoint-reuse-slot.exp testcase, that didn't detect that hbreaks
are not supported in this target.
Ok?
Thanks and regards,
--
Edjunior
gdb/
2014-07-14 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* gdb/ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no
hardware breakpoint support correctly.
---
gdb/ppc-linux-nat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index fcfd452..4c5d878 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1473,6 +1473,9 @@ ppc_linux_can_use_hw_breakpoint (struct target_ops *self,
}
else if (type == bp_hardware_breakpoint)
{
+ if (total_hw_bp == 0)
+ /* No hardware breakpoint support. */
+ return 0;
if (cnt > total_hw_bp)
return -1;
}
--
1.8.4.2
next reply other threads:[~2014-07-14 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 14:55 Edjunior Barbosa Machado [this message]
2014-07-14 15:54 ` Ulrich Weigand
2014-07-14 16:13 ` Joel Brobecker
2014-07-15 8:12 ` 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=1405349255-26782-1-git-send-email-emachado@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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