From: Simon Marchi Date: Thu, 10 Sep 2020 15:56:34 +0000 (-0400) Subject: gdb/testsuite: use multi_line in gdb.base/skip.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9e9ba90b331e76c2ef93db3242a910f5985933e;p=binutils-gdb.git gdb/testsuite: use multi_line in gdb.base/skip.exp 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 --- diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp index 5eba6f177fe..7414103a157 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+\\s* -2\\s+y\\s+n\\s+\\s+n\\s+main\\s* -3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+y\\s+n\\s+\\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+" \ + "2\\s+y\\s+n\\s+\\s+n\\s+main" \ + "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+y\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+y\\s+n\\s+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+y\\s+n\\s+\\s+n\\s+main" \ + "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+y\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+n\\s+n\\s+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+n\\s+n\\s+\\s+n\\s+main" \ + "3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+n\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+y\\s+n\\s+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+y\\s+n\\s+\\s+n\\s+main" \ + "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+y\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+n\\s+n\\s+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+n\\s+n\\s+\\s+n\\s+main" \ + "3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+n\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+\\s* -4\\s+n\\s+n\\s+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+y\\s+n\\s+\\s+n\\s+main" \ + "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+" \ + "4\\s+n\\s+n\\s+\\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+\\s+n\\s+main\\s* -3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+\\s*" + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "2\\s+y\\s+n\\s+\\s+n\\s+main" \ + "3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+"] 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+\\s+n\\s+baz\\s*" \ + [multi_line "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function" \ + "4\\s+n\\s+n\\s+\\s+n\\s+baz"] \ "info skip after deleting 2 3" gdb_test "skip delete"