[gdb/testsuite] Fix FAIL in gdb.base/annota1.exp
authorTom de Vries <tdevries@suse.de>
Thu, 7 Oct 2021 03:45:32 +0000 (05:45 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 7 Oct 2021 03:45:32 +0000 (05:45 +0200)
On openSUSE tumbleweed I run into:
...
FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
...
due to a message related to libthread_db:
...
^Z^Zstarting^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
^M
^Z^Zframes-invalid^M
...
which is not matched by the regexp.

Fix this by updating the regexp.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/annota1.exp

index 7a08137a1b039b21043652e5326f83e390d4930b..13e82c176e22d28915c9e7470d7699f9c565f767 100644 (file)
@@ -136,6 +136,10 @@ set warning_gdb_index_re \
         "to use the section anyway\\."]
 set reading_re \
     "Reading \[^\r\n\]+"
+set libthread_db_re \
+    [multi_line \
+        "\\\[Thread debugging using libthread_db enabled\\\]" \
+        "Using host libthread_db library \[^\r\n\]+"]
 
 set run_re \
     [list \
@@ -143,7 +147,7 @@ set run_re \
         "\(\(\r\n$reading_re\)|\(\r\n$warning_slow_re\)\)*" \
         "\(\r\n$warning_gdb_index_re\)?" \
         "\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n" \
-        "\032\032starting\(\(\r\n$reading_re\)|\(\r\n$warning_slow_re\)\)*" \
+        "\032\032starting\(\(\r\n$reading_re\)|\(\r\n$warning_slow_re\)|\r\n$libthread_db_re\)*" \
         "\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n" \
         "\032\032breakpoint 1\r\n\r\n" \
         "Breakpoint 1, \r\n" \