public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: add back needed -re clause in gdb_breakpoint
@ 2023-01-05 16:36 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2023-01-05 16:36 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cabd67874a6ef7aaed41490d9eaddc4a4869a452
commit cabd67874a6ef7aaed41490d9eaddc4a4869a452
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu Jan 5 11:23:45 2023 -0500
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
Approved-By: Tom de Vries <tdevries@suse.de>
Diff:
---
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 e17eace4cb1..af538e5c8fb 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-05 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 16:36 [binutils-gdb] gdb/testsuite: add back needed -re clause in gdb_breakpoint Simon Marchi
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).