[pushed] gdb/testsuite: use multi_line in gdb.base/skip.exp
Simon Marchi
simon.marchi@polymtl.ca
Thu Jan 21 03:29:37 GMT 2021
From: Simon Marchi <simon.marchi@efficios.com>
This will make it easier to modify, in particular add some indentation.
It is also a bit nicer to read, in my opinion.
gdb/testsuite/ChangeLog;
* gdb.base/skip.exp: Use multi_line where relevant.
Change-Id: Ia11712aac77344e0b8a836f4181d67e1cad3826c
---
gdb/testsuite/gdb.base/skip.exp | 60 ++++++++++++++++-----------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
index 5eba6f177fe1..7414103a1570 100644
--- a/gdb/testsuite/gdb.base/skip.exp
+++ b/gdb/testsuite/gdb.base/skip.exp
@@ -84,11 +84,11 @@ gdb_test "info skip 999" "No skiplist entries found with number 999."
# Does |info skip| look right?
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-1\\s+y\\s+n\\s+.*$srcfile\\s+n\\s+<none>\\s*
-2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*"
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "1\\s+y\\s+n\\s+.*$srcfile\\s+n\\s+<none>" \
+ "2\\s+y\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+y\\s+n\\s+<none>\\s+n\\s+baz"]
# Right now, we have an outstanding skiplist entry on both source
# files, so when we step into the first line in main(), we should step
@@ -109,10 +109,10 @@ with_test_prefix "step after deleting 1" {
gdb_test "skip delete 1"
# Check that entry 1 is missing from |info skip|
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+y\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+y\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip (delete 1)"
if ![runto_main] {
@@ -174,45 +174,45 @@ with_test_prefix "step after enable 3" {
with_test_prefix "admin" {
gdb_test "skip disable"
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+n\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+n\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+n\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip after disabling all"
gdb_test "skip enable"
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+y\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+y\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip after enabling all"
gdb_test "skip disable 4 2-3"
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+n\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+n\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+n\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip after disabling 4 2-3"
gdb_test "skip enable 2-3"
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
-4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+y\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>" \
+ "4\\s+n\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip after enabling 2-3"
gdb_test "info skip 2-3" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
-3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*"
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "2\\s+y\\s+n\\s+<none>\\s+n\\s+main" \
+ "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>"]
gdb_test "skip delete 2 3"
gdb_test "info skip" \
- "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
-4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+ [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \
+ "4\\s+n\\s+n\\s+<none>\\s+n\\s+baz"] \
"info skip after deleting 2 3"
gdb_test "skip delete"
--
2.30.0
More information about the Gdb-patches
mailing list