This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has
- From: Pedro Alves <palves at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, gdb-patches at sourceware dot org
- Date: Tue, 16 Sep 2014 15:25:51 +0100
- Subject: Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has
- Authentication-results: sourceware.org; auth=none
- References: <1410873512-762-1-git-send-email-palves at redhat dot com> <000601cfd1b1$718bd600$54a38200$ at muller@ics-cnrs.unistra.fr> <54183ACC dot 7060001 at redhat dot com>
On 09/16/2014 02:27 PM, Pedro Alves wrote:
> On 09/16/2014 02:23 PM, Pierre Muller wrote:
>>> + gdb_assert {$sw_watch_pc == $sw_watch_pc} "hw watchpoint stops at
>>> right instruction"
>> Shouldn't this be
>> {$sw_watch_pc == $hw_watch_pc}?
>
> Argh... Right you are.
>
> Many thanks,
> Pedro Alves
>
I've pushed the obvious fix.
Thanks again Pierre.
---------
>From 635856f584de7af4b21bb72688c05cd6d9a0aec6 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Tue, 16 Sep 2014 14:27:57 +0100
Subject: [PATCH] Fix watchpoint-stops-at-right-insn.exp
Silly typo...
gdb/testsuite/
2014-09-16 Pedro Alves <palves@redhat.com>
* gdb.base/watchpoint-stops-at-right-insn.exp (test): Compare
software and hardware addresses, not software address against
itself.
---
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c2588d3..c06ba4d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2014-09-16 Pedro Alves <palves@redhat.com>
+ * gdb.base/watchpoint-stops-at-right-insn.exp (test): Compare
+ software and hardware addresses, not software address against
+ itself.
+
+2014-09-16 Pedro Alves <palves@redhat.com>
+
* gdb.base/watchpoint-stops-at-right-insn.c: New file.
* gdb.base/watchpoint-stops-at-right-insn.exp: New file.
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 9ad6080..6039c4c 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -168,7 +168,7 @@ proc test {always_inserted} {
set hw_watch_pc [get_pc "get hw watchpoint PC"]
- gdb_assert {$sw_watch_pc == $sw_watch_pc} "hw watchpoint stops at right instruction"
+ gdb_assert {$sw_watch_pc == $hw_watch_pc} "hw watchpoint stops at right instruction"
}
}
--
1.9.3