]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.base/annota1.exp with pie
authorTom de Vries <tdevries@suse.de>
Mon, 11 Apr 2022 08:28:41 +0000 (10:28 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 11 Apr 2022 08:28:41 +0000 (10:28 +0200)
Since commit 359efc2d894 ("[gdb/testsuite] Make gdb.base/annota1.exp more
robust") we see this fail with target board unix/-fPIE/-pie:
...
FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
...

The problem is that the commit makes the number and order of matched
annotations fixed, while between target boards unix and unix/-fPIE/-pie there
is a difference:
...
 \032\032post-prompt
 Starting program: outputs/gdb.base/annota1/annota1

+\032\032breakpoints-invalid
+
 \032\032starting

 \032\032frames-invalid
...

Fix this by optionally matching the additional annotation.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/annota1.exp

index 40a13e7cf19033f3dce92a4c4c767fa4a6128646..ac6ad6478f41039fa908c9fb706b5bc95c06aa4d 100644 (file)
@@ -159,6 +159,8 @@ set run_re \
         "\r\n\032\032post-prompt\r\n" \
         "Starting program: $binexp \r\n" \
         $optional_re \
+        "\(\r\n\032\032breakpoints-invalid\r\n\)?" \
+        $optional_re \
         "\r\n\032\032starting\r\n" \
         $optional_re \
         "\r\n\032\032frames-invalid\r\n" \