* [RFA] Add watchpoint test with both condition and thread keywords
@ 2013-03-08 18:34 Keith Seitz
2013-03-08 18:45 ` Pedro Alves
0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2013-03-08 18:34 UTC (permalink / raw)
To: gdb-patches@sourceware.org ml
Hi,
While attempting to fix up my constify parse_exp_1 mini-patch, I
discovered the branch of watch_command_1 which does "*tok = '\0';" (evil
as it is) is completely untested.
So I'm adding one to aid my hacking.
Keith
testsuite/ChangeLog
2013-03-08 Keith Seitz <keiths@redhat.com>
* watchpoint.exp: Add test using both condition and thread.
Index: testsuite/gdb.base/watchpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint.exp,v
retrieving revision 1.61
diff -u -p -r1.61 watchpoint.exp
--- testsuite/gdb.base/watchpoint.exp 1 Jan 2013 06:33:26 -0000 1.61
+++ testsuite/gdb.base/watchpoint.exp 8 Mar 2013 18:33:39 -0000
@@ -808,6 +808,10 @@ proc test_no_hw_watchpoints {} {
"Watchpoint \[0-9\]*: ival3.*" \
"set slow conditional watch"
+ gdb_test "watch ival3 if count > 1 thread 1 " \
+ "Watchpoint \[0-9\]*: ival3.*" \
+ "set slow condition watch w/thread"
+
gdb_test "continue" \
"Watchpoint \[0-9\]*: ival3.*Old value = 1.*New value = 2.*" \
"trigger slow conditional watch"
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 18:34 [RFA] Add watchpoint test with both condition and thread keywords Keith Seitz
@ 2013-03-08 18:45 ` Pedro Alves
2013-03-08 19:01 ` Keith Seitz
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Alves @ 2013-03-08 18:45 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 06:34 PM, Keith Seitz wrote:
>
> testsuite/ChangeLog
> 2013-03-08 Keith Seitz <keiths@redhat.com>
>
> * watchpoint.exp: Add test using both condition and thread.
* watchpoint.exp (test_no_hw_watchpoints): Add test using
both condition and thread.
>
> Index: testsuite/gdb.base/watchpoint.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint.exp,v
> retrieving revision 1.61
> diff -u -p -r1.61 watchpoint.exp
> --- testsuite/gdb.base/watchpoint.exp 1 Jan 2013 06:33:26 -0000 1.61
> +++ testsuite/gdb.base/watchpoint.exp 8 Mar 2013 18:33:39 -0000
> @@ -808,6 +808,10 @@ proc test_no_hw_watchpoints {} {
> "Watchpoint \[0-9\]*: ival3.*" \
> "set slow conditional watch"
>
> + gdb_test "watch ival3 if count > 1 thread 1 " \
> + "Watchpoint \[0-9\]*: ival3.*" \
> + "set slow condition watch w/thread"
> +
There's a test below that deletes the previous watchpoint. But
now we have two. Probably doesn't matter as gdb will exit soon,
but still, at least let's add a comment like "check we can
delete software watchpoints, no need to care to remove
them all." or some such.
> gdb_test "continue" \
> "Watchpoint \[0-9\]*: ival3.*Old value = 1.*New value = 2.*" \
> "trigger slow conditional watch"
--
Pedro Alves
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 18:45 ` Pedro Alves
@ 2013-03-08 19:01 ` Keith Seitz
2013-03-08 19:05 ` Keith Seitz
0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2013-03-08 19:01 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 10:44 AM, Pedro Alves wrote:
>> * watchpoint.exp: Add test using both condition and thread.
>
> * watchpoint.exp (test_no_hw_watchpoints): Add test using
> both condition and thread.
This is not my week for submitting patches!
> There's a test below that deletes the previous watchpoint. But
> now we have two. Probably doesn't matter as gdb will exit soon,
> but still, at least let's add a comment like "check we can
> delete software watchpoints, no need to care to remove
> them all." or some such.
I've just followed suit and deleted it, just like the one below it.
/me gets more coffee
Keith
testsuite/ChangeLog
2013-03-08 Keith Seitz <keiths@redhat.com>
* watchpoint.exp (test_no_hw_watchpoints: Add test using
both condition and thread. Then delete the watchpoint.
Index: testsuite/gdb.base/watchpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint.exp,v
retrieving revision 1.61
diff -u -p -r1.61 watchpoint.exp
--- testsuite/gdb.base/watchpoint.exp 1 Jan 2013 06:33:26 -0000 1.61
+++ testsuite/gdb.base/watchpoint.exp 8 Mar 2013 18:59:49 -0000
@@ -808,6 +808,10 @@ proc test_no_hw_watchpoints {} {
"Watchpoint \[0-9\]*: ival3.*" \
"set slow conditional watch"
+ gdb_test "watch ival3 if count > 1 thread 1 " \
+ "Watchpoint \[0-9\]*: ival3.*" \
+ "set slow condition watch w/thread"
+
gdb_test "continue" \
"Watchpoint \[0-9\]*: ival3.*Old value = 1.*New value = 2.*" \
"trigger slow conditional watch"
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 19:01 ` Keith Seitz
@ 2013-03-08 19:05 ` Keith Seitz
2013-03-08 19:08 ` Pedro Alves
0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2013-03-08 19:05 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 11:00 AM, Keith Seitz wrote:
> /me gets more coffee
I should have done this BEFORE I sent the "revised" patch. :-(
Sorry about that.
Keith
testsuite/ChangeLog
2013-03-08 Keith Seitz <keiths@redhat.com>
* watchpoint.exp (test_no_hw_watchpoints: Add test using
both condition and thread. Then delete the watchpoint.
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp
b/gdb/testsuite/gdb.base/watchpoint.exp
index 5086ae5..08a4a9a 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -808,6 +808,12 @@ proc test_no_hw_watchpoints {} {
"Watchpoint \[0-9\]*: ival3.*" \
"set slow conditional watch"
+ gdb_test "watch ival3 if count > 1 thread 1 " \
+ "Watchpoint \[0-9\]*: ival3.*" \
+ "set slow condition watch w/thread"
+
+ gdb_test_no_output "delete \$bpnum" "delete watch w/cond and thread"
+
gdb_test "continue" \
"Watchpoint \[0-9\]*: ival3.*Old value = 1.*New value = 2.*" \
"trigger slow conditional watch"
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 19:05 ` Keith Seitz
@ 2013-03-08 19:08 ` Pedro Alves
2013-03-08 19:24 ` Keith Seitz
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Alves @ 2013-03-08 19:08 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 07:05 PM, Keith Seitz wrote:
> On 03/08/2013 11:00 AM, Keith Seitz wrote:
>
>> /me gets more coffee
>
> I should have done this BEFORE I sent the "revised" patch. :-(
>
> Sorry about that.
Not a problem at all.
> testsuite/ChangeLog
> 2013-03-08 Keith Seitz <keiths@redhat.com>
>
> * watchpoint.exp (test_no_hw_watchpoints: Add test using
Missing ).
> both condition and thread. Then delete the watchpoint.
>
> diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
> index 5086ae5..08a4a9a 100644
> --- a/gdb/testsuite/gdb.base/watchpoint.exp
> +++ b/gdb/testsuite/gdb.base/watchpoint.exp
> @@ -808,6 +808,12 @@ proc test_no_hw_watchpoints {} {
> "Watchpoint \[0-9\]*: ival3.*" \
> "set slow conditional watch"
>
> + gdb_test "watch ival3 if count > 1 thread 1 " \
> + "Watchpoint \[0-9\]*: ival3.*" \
> + "set slow condition watch w/thread"
> +
> + gdb_test_no_output "delete \$bpnum" "delete watch w/cond and thread"
This now deletes the same breakpoint twice. $bpnum is the number of
the last breakpoint/watchpoint created.
> +
> gdb_test "continue" \
> "Watchpoint \[0-9\]*: ival3.*Old value = 1.*New value = 2.*" \
> "trigger slow conditional watch"
--
Pedro Alves
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 19:08 ` Pedro Alves
@ 2013-03-08 19:24 ` Keith Seitz
2013-03-08 19:29 ` Pedro Alves
0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2013-03-08 19:24 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 11:08 AM, Pedro Alves wrote:
> On 03/08/2013 07:05 PM, Keith Seitz wrote:
>> On 03/08/2013 11:00 AM, Keith Seitz wrote:
>>
>>> /me gets more coffee
>>
>> I should have done this BEFORE I sent the "revised" patch. :-(
>>
>> Sorry about that.
>
> Not a problem at all.
>
Sheesh. Wrong window/branch. Hopefully sixty-third time is the charm!
Keith
testsuite/ChangeLog
2013-03-08 Keith Seitz <keiths@redhat.com>
* watchpoint.exp (test_no_hw_watchpoints): Add test using
both condition and thread. Then delete the watchpoint.
Index: watchpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint.exp,v
retrieving revision 1.61
diff -u -p -r1.61 watchpoint.exp
--- watchpoint.exp 1 Jan 2013 06:33:26 -0000 1.61
+++ watchpoint.exp 8 Mar 2013 19:23:59 -0000
@@ -814,6 +814,12 @@ proc test_no_hw_watchpoints {} {
gdb_test_no_output "delete \$bpnum" "delete watch ival3"
+ gdb_test "watch ival3 if count > 1 thread 1 " \
+ "Watchpoint \[0-9\]*: ival3.*" \
+ "set slow condition watch w/thread"
+
+ gdb_test_no_output "delete \$bpnum" "delete watch w/condition and
thread"
+
# We've explicitly disabled hardware watches. Verify that GDB
# refrains from using them.
#
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 19:24 ` Keith Seitz
@ 2013-03-08 19:29 ` Pedro Alves
2013-03-11 19:03 ` Keith Seitz
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Alves @ 2013-03-08 19:29 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 03/08/2013 07:24 PM, Keith Seitz wrote:
> Sheesh. Wrong window/branch. Hopefully sixty-third time is the charm!
Looks like it. ;-)
> testsuite/ChangeLog
> 2013-03-08 Keith Seitz <keiths@redhat.com>
>
> * watchpoint.exp (test_no_hw_watchpoints): Add test using
> both condition and thread. Then delete the watchpoint.
OK.
--
Pedro Alves
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Add watchpoint test with both condition and thread keywords
2013-03-08 19:29 ` Pedro Alves
@ 2013-03-11 19:03 ` Keith Seitz
0 siblings, 0 replies; 8+ messages in thread
From: Keith Seitz @ 2013-03-11 19:03 UTC (permalink / raw)
To: gdb-patches@sourceware.org ml
On 03/08/2013 11:28 AM, Pedro Alves wrote:
> On 03/08/2013 07:24 PM, Keith Seitz wrote:
>> testsuite/ChangeLog
>> 2013-03-08 Keith Seitz <keiths@redhat.com>
>>
>> * watchpoint.exp (test_no_hw_watchpoints): Add test using
>> both condition and thread. Then delete the watchpoint.
>
> OK.
I've committed this patch. Thank you for taking a look, Pedro.
Keith
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-03-11 19:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 18:34 [RFA] Add watchpoint test with both condition and thread keywords Keith Seitz
2013-03-08 18:45 ` Pedro Alves
2013-03-08 19:01 ` Keith Seitz
2013-03-08 19:05 ` Keith Seitz
2013-03-08 19:08 ` Pedro Alves
2013-03-08 19:24 ` Keith Seitz
2013-03-08 19:29 ` Pedro Alves
2013-03-11 19:03 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox