From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint
Date: Thu, 5 Jan 2023 11:28:54 -0500 [thread overview]
Message-ID: <315f1d7a-a948-5512-fd89-a40d7a25e937@polymtl.ca> (raw)
In-Reply-To: <ff5f8aaa-613a-9a2c-2c1a-360a1ea7ed0b@suse.de>
On 1/5/23 04:04, Tom de Vries wrote:
> On 1/3/23 20:22, Simon Marchi via Gdb-patches wrote:
>> - -re "$gdb_prompt $" {
>> - if { $print_fail } {
>> - fail $test_name
>> - }
>> - return 0
>> - }
>
> This caused:
> ...
> FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: gdb_breakpoint: set breakpoint at 1
> FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: !$breakpoint_at_missing_lineno_set
> FAIL: gdb.go/methods.exp: going to first breakpoint (the program exited)
> FAIL: gdb.go/methods.exp: going to second breakpoint (the program is no longer running)
> ...
>
> Re-inserting this piece of code fixes it.
Ah, sorry for this, and thanks for reporting. The CI test job I usually
use is a bit broken right now, so I don't test as well as I should.
Does the patch below look good?
From db4ea2e9710bfe460d5f99ebf8d3fd670a81dfa2 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu, 5 Jan 2023 11:23:45 -0500
Subject: [PATCH] gdb/testsuite: add back needed -re clause in gdb_breakpoint
Commit 4b9728be ("gdb: use gdb_test_multiple in gdb_breakpoint") caused,
amongst others:
(gdb) break 1^M
No line 1 in the current file.^M
Make breakpoint pending on future shared library load? (y or [n]) n^M
(gdb) FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: gdb_breakpoint: set breakpoint at 1
FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: !$breakpoint_at_missing_lineno_set
This is because it removed one empty -re clause (matching just the
prompt) that is necessary after replying "n" to the pending breakpoint
question. Add this clause back.
Change-Id: Ibfaa059d58bbea660bc29f0547e2f75c323fcbc6
---
gdb/testsuite/lib/gdb.exp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e17eace4cb13..af538e5c8fbd 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -657,6 +657,12 @@ proc gdb_breakpoint { linespec args } {
send_gdb "$pending_response\n"
exp_continue
}
+ -re "$gdb_prompt $" {
+ if { $print_fail } {
+ fail $test_name
+ }
+ return 0
+ }
}
if { $print_pass } {
pass $test_name
base-commit: d66641b604182246b648f662d3c32200ac921365
--
2.39.0
next prev parent reply other threads:[~2023-01-05 16:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 19:22 Simon Marchi
2023-01-04 9:15 ` Lancelot SIX
2023-01-04 16:11 ` Simon Marchi
2023-01-04 16:18 ` Lancelot SIX
2023-01-04 16:22 ` Simon Marchi
2023-01-04 17:40 ` Lancelot SIX
2023-01-04 18:02 ` Lancelot SIX
2023-01-04 19:05 ` Simon Marchi
2023-01-04 19:12 ` Lancelot SIX
2023-01-05 9:04 ` Tom de Vries
2023-01-05 16:28 ` Simon Marchi [this message]
2023-01-05 16:31 ` Tom de Vries
2023-01-05 16:36 ` Simon Marchi
2023-01-10 15:33 ` Pedro Alves
2023-01-10 15:50 ` Simon Marchi
2023-01-10 19:56 ` Pedro Alves
2023-01-10 20:42 ` Simon Marchi
2023-01-11 19:05 ` Pedro Alves
2023-01-11 19:42 ` Simon Marchi
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=315f1d7a-a948-5512-fd89-a40d7a25e937@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).