* [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching
@ 2022-11-20 23:36 Philippe Waroquiers
2022-11-21 12:58 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Waroquiers @ 2022-11-20 23:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
step-over-syscall.exp has some specific tests for gdbserver.
The regexp matching breakpoint hit must take the added locno into account.
Test re-run in 3 modes (normal, native-gdbserver and native-extended-gdbserver).
---
gdb/testsuite/gdb.base/step-over-syscall.exp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 788f6e3f5d0..3160900ad83 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -321,6 +321,7 @@ proc step_over_syscall { syscall } {
# "on" or "off".
proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
+ global bkptno_numopt_re
with_test_prefix "break cond on target : $syscall" {
set testfile "step-over-$syscall"
@@ -368,12 +369,12 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
if { $detach_on_fork == "off" } {
gdb_test "inferior 1"
gdb_test "break marker" "Breakpoint.*at.*"
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
"continue to marker"
}
} else {
gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
"continue to marker"
}
}
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching
2022-11-20 23:36 [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching Philippe Waroquiers
@ 2022-11-21 12:58 ` Simon Marchi
2022-11-21 20:15 ` Philippe Waroquiers
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-11-21 12:58 UTC (permalink / raw)
To: Philippe Waroquiers, gdb-patches
On 11/20/22 18:36, Philippe Waroquiers via Gdb-patches wrote:
> step-over-syscall.exp has some specific tests for gdbserver.
> The regexp matching breakpoint hit must take the added locno into account.
>
> Test re-run in 3 modes (normal, native-gdbserver and native-extended-gdbserver).
> ---
> gdb/testsuite/gdb.base/step-over-syscall.exp | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
> index 788f6e3f5d0..3160900ad83 100644
> --- a/gdb/testsuite/gdb.base/step-over-syscall.exp
> +++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
> @@ -321,6 +321,7 @@ proc step_over_syscall { syscall } {
> # "on" or "off".
>
> proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
> + global bkptno_numopt_re
> with_test_prefix "break cond on target : $syscall" {
> set testfile "step-over-$syscall"
>
> @@ -368,12 +369,12 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
> if { $detach_on_fork == "off" } {
> gdb_test "inferior 1"
> gdb_test "break marker" "Breakpoint.*at.*"
> - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
> + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
> "continue to marker"
> }
> } else {
> gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
> - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
> + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
I would suggest using the $::bkptno_numopt_re form (and removing the
global declaration), that makes it clear on use that this is a global
variable. With that fixed:
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching
2022-11-21 12:58 ` Simon Marchi
@ 2022-11-21 20:15 ` Philippe Waroquiers
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Waroquiers @ 2022-11-21 20:15 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On Mon, 2022-11-21 at 07:58 -0500, Simon Marchi wrote:
>
> On 11/20/22 18:36, Philippe Waroquiers via Gdb-patches wrote:
> > step-over-syscall.exp has some specific tests for gdbserver.
> > The regexp matching breakpoint hit must take the added locno into account.
> >
> > Test re-run in 3 modes (normal, native-gdbserver and native-extended-gdbserver).
> > ---
> > gdb/testsuite/gdb.base/step-over-syscall.exp | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
> > index 788f6e3f5d0..3160900ad83 100644
> > --- a/gdb/testsuite/gdb.base/step-over-syscall.exp
> > +++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
> > @@ -321,6 +321,7 @@ proc step_over_syscall { syscall } {
> > # "on" or "off".
> >
> >
> > proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
> > + global bkptno_numopt_re
> > with_test_prefix "break cond on target : $syscall" {
> > set testfile "step-over-$syscall"
> >
> >
> > @@ -368,12 +369,12 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
> > if { $detach_on_fork == "off" } {
> > gdb_test "inferior 1"
> > gdb_test "break marker" "Breakpoint.*at.*"
> > - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
> > + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
> > "continue to marker"
> > }
> > } else {
> > gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
> > - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
> > + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \
>
> I would suggest using the $::bkptno_numopt_re form (and removing the
> global declaration), that makes it clear on use that this is a global
> variable. With that fixed:
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>
> Simon
Pushed after implementing the suggestion above.
Thanks for the review.
Philippe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-21 20:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 23:36 [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching Philippe Waroquiers
2022-11-21 12:58 ` Simon Marchi
2022-11-21 20:15 ` Philippe Waroquiers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).