* [RFA/testsuite] Cleanup pending breakpoints
@ 2013-04-24 12:20 Keith Seitz
2013-04-24 18:24 ` Pedro Alves
0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2013-04-24 12:20 UTC (permalink / raw)
To: gdb-patches@sourceware.org ml
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
Hi,
Some types of pending breakpoints are commonly set by using
gdb_test_multiple to respond to the "Make breakpoint pending?" question.
This patch adds support for several breakpoint types to gdb_breakpoint
so that the standard machinery can be used instead.
I've also taken this opportunity to update the neglected documentation
for gdb_breakpoint. AFAICT, "passfail" just appeared out of nowhere, and
it has never been implemented/documented.
Comments/questions?
Keith
testsuite/ChangeLog
2013-04-23 Keith Seitz <keiths@redhat.com>
* lib/gdb.exp (gdb_breakpoint): Add support for dprintf,
trace, and ftrace.
* gdb.base/dprintf-pending.exp: Use gdb_breakpoint to
set all breakpoints/dprintfs/tracepoints/fast tracepoints.
* gdb.base/dprintf.exp: Likewise.
* gdb.base/pending.exp: Likewise.
* gdb.base/watchpoint-solib.exp: Likewise.
* gdb.trace/change-loc.exp (tracepoint_change_loc_2): Likewise.
Remove expected output to delete breakpoint; use
"delete $bpnum" instead.
* gdb.trace/pending.exp (pending_tracepoint_resolved): Use
gdb_breakpoint to set tracepoints.
(pending_tracepoint_works): Likewise.
(pending_tracepoint_resolved_during_trace): Likewise.
(pending_tracepoint_installed_during_trace): Likewise.
(pending_tracepoint_disconnect_during_trace): Likewise.
(pending_tracepoint_disconnect_after_resolved): Likewise.
(pending_tracepoint_with_action_resolved): Likewise.
[-- Attachment #2: pending-bp-cleanup.patch --]
[-- Type: text/x-patch, Size: 13889 bytes --]
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 06e1226..34392ab 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -335,15 +335,21 @@ proc gdb_start_cmd {args} {
}
# Set a breakpoint at FUNCTION. If there is an additional argument it is
-# a list of options; the supported options are allow-pending, temporary,
-# message, no-message, and passfail.
+# a list of options; the supported options are:
+#
+# allow-pending -- permit a pending breakpoint to be set
+# temporary -- set a temporary breakpoint, e.g., "tbreak"
+# message -- print out PASS messages*
+# no-message -- do not print FAIL messages*
+# trace -- set a trace tracepoint, e.g, "trace"
+# ftrace -- set a fast tracepoint, e.g., "ftrace"
+# dprintf -- set a dynamic printf, e.g., "dprintf"
+#
# The result is 1 for success, 0 for failure.
#
-# Note: The handling of message vs no-message is messed up, but it's based
+# *Note: The handling of message vs no-message is messed up, but it's based
# on historical usage. By default this function does not print passes,
# only fails.
-# no-message: turns off printing of fails (and passes, but they're already off)
-# message: turns on printing of passes (and fails, but they're already on)
proc gdb_breakpoint { function args } {
global gdb_prompt
@@ -354,11 +360,21 @@ proc gdb_breakpoint { function args } {
set pending_response y
}
- set break_command "break"
- set break_message "Breakpoint"
- if {[lsearch -exact $args temporary] != -1} {
- set break_command "tbreak"
- set break_message "Temporary breakpoint"
+ if {[lsearch -exact $args "dprintf"] != -1} {
+ set break_command "dprintf"
+ set break_message "Dprintf"
+ } elseif {[lsearch -exact $args "temporary"] != -1} {
+ set break_command "tbreak"
+ set break_message "Temporary breakpoint"
+ } elseif {[lsearch -exact $args "trace"] != -1} {
+ set break_command "trace"
+ set break_message "Tracepoint"
+ } elseif {[lsearch -exact $args "ftrace"] != -1} {
+ set break_command "ftrace"
+ set break_message "Fast tracepoint"
+ } else {
+ set break_command "break"
+ set break_message "Breakpoint"
}
set print_pass 0
@@ -372,7 +388,7 @@ proc gdb_breakpoint { function args } {
set print_pass 1
}
- set test_name "setting breakpoint at $function"
+ set test_name "setting [string tolower $break_message] at $function"
send_gdb "$break_command $function\n"
# The first two regexps are what we get with -g, the third is without -g.
@@ -388,7 +404,7 @@ proc gdb_breakpoint { function args } {
return 0
}
}
- -re "Make breakpoint pending.*y or \\\[n\\\]. $" {
+ -re "Make [string tolower $break_message] pending.*y or \\\[n\\\]. $" {
send_gdb "$pending_response\n"
exp_continue
}
diff --git a/gdb/testsuite/gdb.base/dprintf-pending.exp b/gdb/testsuite/gdb.base/dprintf-pending.exp
index 87abfce..dd9e525 100644
--- a/gdb/testsuite/gdb.base/dprintf-pending.exp
+++ b/gdb/testsuite/gdb.base/dprintf-pending.exp
@@ -41,12 +41,7 @@ with_test_prefix "without format" {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test \
- "dprintf pendfunc" \
- "Dprintf.*pendfunc.*pending." \
- "set pending dprintf" \
- ".*Make dprintf pending.*y or \\\[n\\\]. $" \
- "y"
+ gdb_breakpoint "pendfunc" dprintf allow-pending
gdb_test "file ${binfile}" ".*Error in re-setting breakpoint.*" "resolved dprintf fails to be re-set"
}
@@ -56,12 +51,7 @@ with_test_prefix "without symbols" {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test \
- "dprintf pendfunc1, \"x=%d\\n\", x" \
- "Dprintf.*pendfunc1.*pending." \
- "set pending dprintf" \
- ".*Make dprintf pending.*y or \\\[n\\\]. $" \
- "y"
+ gdb_breakpoint "pendfunc1, \"x=%d\\n\", x" dprintf allow-pending
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -83,12 +73,7 @@ gdb_load_shlibs $lib_sl
# Test setting, querying, and modifying pending breakpoints
#
-gdb_test \
- "dprintf pendfunc1, \"x=%d\\n\", x" \
- "Dprintf.*pendfunc1.*pending." \
- "set pending dprintf" \
- ".*Make dprintf pending.*y or \\\[n\\\]. $" \
- "y"
+gdb_breakpoint "pendfunc1, \"x=%d\\n\", x" dprintf allow-pending
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
diff --git a/gdb/testsuite/gdb.base/dprintf.exp b/gdb/testsuite/gdb.base/dprintf.exp
index 71f3554..cbec5c4 100644
--- a/gdb/testsuite/gdb.base/dprintf.exp
+++ b/gdb/testsuite/gdb.base/dprintf.exp
@@ -37,13 +37,11 @@ delete_breakpoints
gdb_breakpoint "main"
-gdb_test "dprintf foo,\"At foo entry\\n\"" \
- "Dprintf .*"
+gdb_breakpoint "foo,\"At foo entry\\n\"" dprintf
gdb_test "ignore \$bpnum 1" ".*Will ignore next crossing of breakpoint.*"
-gdb_test "dprintf $dp_location1,\"arg=%d, g=%d\\n\", arg, g" \
- "Dprintf .*"
+gdb_breakpoint "$dp_location1,\"arg=%d, g=%d\\n\", arg, g" dprintf
gdb_test_sequence "info breakpoints" "dprintf info 1" {
"\[\r\n\]Num Type Disp Enb Address +What"
@@ -56,8 +54,7 @@ gdb_test_sequence "info breakpoints" "dprintf info 1" {
"\[\r\n\] continue"
}
-gdb_test "break $bp_location1" \
- "Breakpoint .*"
+gdb_breakpoint "$bp_location1"
gdb_run_cmd
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
index 68322f5..ca84346 100644
--- a/gdb/testsuite/gdb.base/pending.exp
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -49,11 +49,7 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint (without symbols)"
- }
-}
+gdb_breakpoint "pendfunc1" allow-pending
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -84,11 +80,7 @@ gdb_load_shlibs $lib_sl
# Test setting, querying, and modifying pending breakpoints
#
-gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint"
- }
-}
+gdb_breakpoint "pendfunc1" allow-pending
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -166,12 +158,7 @@ gdb_test "info break" \
#
set bp2_loc [gdb_get_line_number "y = x + 4" ${libfile}.c]
-gdb_test_multiple "break pendshr.c:$bp2_loc if x > 3" "Set pending breakpoint 2" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*pendshr.c:$bp2_loc.*pending." \
- "Set pending breakpoint 2"
- }
-}
+gdb_breakpoint "pendshr.c:$bp2_loc if x > 3" allow-pending
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -188,12 +175,7 @@ gdb_test "info break" \
#
set bp3_loc [gdb_get_line_number "printf" ${libfile}.c]
-gdb_test_multiple "break pendshr.c:$bp3_loc" "Set pending breakpoint 3" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*pendshr.c:$bp3_loc.*pending." \
- "Set pending breakpoint 3"
- }
-}
+gdb_breakpoint "pendshr.c:$bp3_loc" allow-pending
gdb_test {ignore $bpnum 2} "Will ignore next 2 crossings of breakpoint .*" \
"set ignore count on pending breakpoint 3"
@@ -257,12 +239,7 @@ gdb_breakpoint "main"
#
# Set non-existent pending breakpoint
#
-gdb_test_multiple "break imaginary" "set imaginary pending breakpoint" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*imaginary.*pending." \
- "set imaginary pending breakpoint"
- }
-}
+gdb_breakpoint "imaginary" allow-pending
#
# rerun program and make sure that any pending breakpoint remains and no
diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp
index a1a4485..b87956d 100644
--- a/gdb/testsuite/gdb.base/watchpoint-solib.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp
@@ -64,11 +64,7 @@ if [target_info exists gdb,no_hardware_watchpoints] {
# Test that if we set a watchpoint on a global variable
# in a explicitly loaded shared library, and then
# re-run the application, gdb does not crash.
-gdb_test_multiple "break foo" "set pending breakpoint" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*foo.*pending." "set pending breakpoint"
- }
-}
+gdb_breakpoint "foo" allow-pending
set prev_timeout $timeout
set timeout 120
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index 3a79b10..e55254c 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -187,11 +187,7 @@ proc tracepoint_change_loc_2 { trace_type } {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test_multiple "${trace_type} set_tracepoint" "set pending tracepoint" {
- -re ".*Make \(|fast \)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_tracepoint.*pending." "set pending tracepoint"
- }
- }
+ gdb_breakpoint "set_tracepoint" $trace_type allow-pending
gdb_trace_setactions "set action for tracepoint" "" \
"collect \$$pcreg" "^$"
@@ -210,18 +206,13 @@ proc tracepoint_change_loc_2 { trace_type } {
\[0-9\]+\[\t \]+\(|fast \)tracepoint\[ \]+keep y.*func4.*" \
"tracepoint with one location"
- set main_bp 0
- gdb_test_multiple "break main" "set breakpoint on main" {
- -re "Breakpoint (\[0-9\]*) at .*, line.*$gdb_prompt $" {
- set main_bp $expect_out(1,string)
- }
- }
+ gdb_breakpoint "main"
gdb_run_cmd
gdb_test "" \
".*Breakpoint.*main.*at.*$srcfile.*" \
"run to main"
- gdb_test_no_output "delete break $main_bp"
+ gdb_test_no_output "delete break \$bpnum"
# tracepoint has two locations after shlib change-loc-1 is loaded.
gdb_test "info trace" \
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index 0308e13..87a2ae0 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -71,12 +71,7 @@ proc pending_tracepoint_resolved { trace_type } {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point1.*pending." \
- "set pending tracepoint (without symbols)"
- }
- }
+ gdb_breakpoint "set_point1" $trace_type allow-pending
gdb_test "info trace" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -113,13 +108,7 @@ proc pending_tracepoint_works { trace_type } {
# Test setting and querying pending tracepoints
- gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" \
- "\(Fast t|T\)racepoint.*set_point1.*pending." \
- "set pending tracepoint"
- }
- }
+ gdb_breakpoint "set_point1" $trace_type allow-pending
gdb_test "info trace" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -187,12 +176,7 @@ proc pending_tracepoint_resolved_during_trace { trace_type } \
return -1
}
- gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \
- "set pending tracepoint (without symbols)"
- }
- }
+ gdb_breakpoint "set_point2" $trace_type allow-pending
gdb_test "info trace" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -268,12 +252,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \
"continue to marker 1"
# Set a pending tracepoint during a tracing experiment.
- gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \
- "set pending tracepoint"
- }
- }
+ gdb_breakpoint "set_point2" $trace_type allow-pending
gdb_test "info trace" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
@@ -329,12 +308,7 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } \
return -1
}
- gdb_test_multiple "trace pendfunc3" "set pending tracepoint on set_point2" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*pendfunc3.*pending." \
- "set pending tracepoint on pendfun3"
- }
- }
+ gdb_breakpoint "pendfunc3" trace allow-pending
gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \
"breakpoint on marker"
@@ -377,12 +351,7 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } \
return -1
}
- gdb_test_multiple "trace set_point2" "set pending tracepoint on set_point2" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \
- "set pending tracepoint on pendfun2"
- }
- }
+ gdb_breakpoint "set_point2" trace allow-pending
gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \
"breakpoint on marker"
@@ -429,12 +398,7 @@ proc pending_tracepoint_with_action_resolved { trace_type } \
return -1
}
- gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \
- "set pending tracepoint (without symbols)"
- }
- }
+ gdb_breakpoint "set_point2" $trace_type allow-pending
set pcreg "pc"
if [is_amd64_regs_target] {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/testsuite] Cleanup pending breakpoints
2013-04-24 12:20 [RFA/testsuite] Cleanup pending breakpoints Keith Seitz
@ 2013-04-24 18:24 ` Pedro Alves
2013-04-26 11:37 ` Keith Seitz
0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2013-04-24 18:24 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 04/24/2013 12:18 AM, Keith Seitz wrote:
> Hi,
>
> Some types of pending breakpoints are commonly set by using gdb_test_multiple to respond to the "Make breakpoint pending?" question. This patch adds support for several breakpoint types to gdb_breakpoint so that the standard machinery can be used instead.
>
> I've also taken this opportunity to update the neglected documentation for gdb_breakpoint. AFAICT, "passfail" just appeared out of nowhere, and it has never been implemented/documented.
Whenever you feel compelled to say "also" in a patch description,
consider splitting the patch in two. ;-) Updating the documentation
part could go first, and would be clearly an improvement. Extending
the interface could go afterwards, and that patch would then actually
be clearer.
>
> Comments/questions?
I wonder whether "allow-pending" is the right option for the "pending" tests.
As in, "allow" != "require". I wonder whether we're losing test
coverage in those cases?
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/testsuite] Cleanup pending breakpoints
2013-04-24 18:24 ` Pedro Alves
@ 2013-04-26 11:37 ` Keith Seitz
2013-04-26 20:30 ` Pedro Alves
0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2013-04-26 11:37 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches@sourceware.org ml
On 04/24/2013 07:35 AM, Pedro Alves wrote:
> Whenever you feel compelled to say "also" in a patch description,
> consider splitting the patch in two. ;-) Updating the documentation
> part could go first, and would be clearly an improvement. Extending
> the interface could go afterwards, and that patch would then actually
> be clearer.
I now feel compelled to submit them separately. :-)
>> Comments/questions?
>
> I wonder whether "allow-pending" is the right option for the "pending" tests.
> As in, "allow" != "require". I wonder whether we're losing test
> coverage in those cases?
Well, yes and no. From reading through all the tests, I think the
"allow-pending" option is a bit underdefined/underterministic. Many of
the tests that use it pretty much would fail miserably if a real
breakpoint was set instead, yet "allow-pending" doesn't fail if this
happens.
IMO gdb_breakpoint should set what was requested or FAIL, e.g., if
allow-pending, ONLY pending breakpoint would produce a PASS.
Nonetheless, since we have it already, I have patches now which add a
"pending" option to gdb_breakpoint, meaning that it *must* set a pending
breakpoint. Anything else will FAIL.
Or I can mutate allow-pending to this new pending and eliminate the
ambiguity that allow-pending introduced.
What would you prefer?
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/testsuite] Cleanup pending breakpoints
2013-04-26 11:37 ` Keith Seitz
@ 2013-04-26 20:30 ` Pedro Alves
2013-04-26 20:45 ` Keith Seitz
0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2013-04-26 20:30 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 04/25/2013 08:41 PM, Keith Seitz wrote:
> On 04/24/2013 07:35 AM, Pedro Alves wrote:
>
>>> Comments/questions?
>>
>> I wonder whether "allow-pending" is the right option for the "pending" tests.
>> As in, "allow" != "require". I wonder whether we're losing test
>> coverage in those cases?
>
> Well, yes and no. From reading through all the tests, I think the "allow-pending" option is a bit underdefined/underterministic. Many of the tests that use it pretty much would fail miserably if a real breakpoint was set instead, yet "allow-pending" doesn't fail if this happens.
>
> IMO gdb_breakpoint should set what was requested or FAIL,
I agree, but...
e.g., if allow-pending, ONLY pending breakpoint would produce a PASS.
...right, but then "allow" would be confusing.
> Nonetheless, since we have it already, I have patches now which add a "pending" option to gdb_breakpoint, meaning that it *must* set a pending breakpoint. Anything else will FAIL.
/me likes.
> Or I can mutate allow-pending to this new pending and eliminate the ambiguity that allow-pending introduced.
Not sure I understand the difference. You mean, retain the "allow-pending"
spelling, but make it _require_ pending? I'd rather not, as it's
confusing naming/API. If in the end, there's no use in the tree for
an "allow-pending" option that allows pending but doesn't fail with a
regular non-pending breakpoint, in addition to a new "pending" option that
_requires_ pending, then I'd rather eliminate "allow-pending".
> What would you prefer?
Thanks,
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/testsuite] Cleanup pending breakpoints
2013-04-26 20:30 ` Pedro Alves
@ 2013-04-26 20:45 ` Keith Seitz
2013-04-26 20:46 ` Pedro Alves
0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2013-04-26 20:45 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches@sourceware.org ml
On 04/26/2013 10:44 AM, Pedro Alves wrote:
> If in the end, there's no use in the tree for an "allow-pending"
> option that allows pending but doesn't fail with a regular
> non-pending breakpoint, in addition to a new "pending" option that
> _requires_ pending, then I'd rather eliminate "allow-pending".
Right, that's what I meant -- remove "allow-pending" and add "pending".
I suggest for the immediate time, we/I introduce "pending" (i.e, fail if
regular BP set), and then we/I can go back and take a look at all the
users of allow-pending and ascertain whether they would work (or were
supposed to work) if a normal breakpoint was set.
From the dozen cases or two that I've already looked at (or written),
all were really of the required type not optional type, i.e., the test
was written specifically for a pending breakpoint; a regular breakpoint
would break the test.
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/testsuite] Cleanup pending breakpoints
2013-04-26 20:45 ` Keith Seitz
@ 2013-04-26 20:46 ` Pedro Alves
0 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves @ 2013-04-26 20:46 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml
On 04/26/2013 06:50 PM, Keith Seitz wrote:
> On 04/26/2013 10:44 AM, Pedro Alves wrote:
>> If in the end, there's no use in the tree for an "allow-pending"
>> option that allows pending but doesn't fail with a regular
>> non-pending breakpoint, in addition to a new "pending" option that
>> _requires_ pending, then I'd rather eliminate "allow-pending".
>
> Right, that's what I meant -- remove "allow-pending" and add "pending". I suggest for the immediate time, we/I introduce "pending" (i.e, fail if regular BP set), and then we/I can go back and take a look at all the users of allow-pending and ascertain whether they would work (or were supposed to work) if a normal breakpoint was set.
>
> From the dozen cases or two that I've already looked at (or written), all were really of the required type not optional type, i.e., the test was written specifically for a pending breakpoint; a regular breakpoint would break the test.
Sounds like a good plan to me.
Thanks,
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-26 18:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-24 12:20 [RFA/testsuite] Cleanup pending breakpoints Keith Seitz
2013-04-24 18:24 ` Pedro Alves
2013-04-26 11:37 ` Keith Seitz
2013-04-26 20:30 ` Pedro Alves
2013-04-26 20:45 ` Keith Seitz
2013-04-26 20:46 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox