[gdb/testsuite] Fix gdb.threads/check-libthread-db.exp with glibc 2.34
authorTom de Vries <tdevries@suse.de>
Thu, 7 Oct 2021 16:00:08 +0000 (18:00 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 7 Oct 2021 16:00:08 +0000 (18:00 +0200)
commitd7a6aa74c8672cfc676754a55ca1fde3fc03dc50
tree4626d5e749c07d4dfbda606a472c55961e37c67a
parent22589c4996243528979e5815dfbb5a46cbd419a0
[gdb/testsuite] Fix gdb.threads/check-libthread-db.exp with glibc 2.34

When running test-case gdb.threads/check-libthread-db.exp on openSUSE
Tumbleweed (with glibc 2.34) I get:
...
(gdb) continue^M
Continuing.^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
Stopped due to shared library event:^M
  Inferior loaded /lib64/libm.so.6^M
    /lib64/libc.so.6^M
(gdb) FAIL: gdb.threads/check-libthread-db.exp: user-initiated check: continue
...

The check expect the inferior to load libpthread, but since glibc 2.34
libpthread has been integrated into glibc, and consequently it's no longer
a dependency:
...
$ ldd outputs/gdb.threads/check-libthread-db/check-libthread-db
        linux-vdso.so.1 (0x00007ffe4cae4000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f167c77c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f167c572000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f167c86e000)
...

Fix this by updating the regexp to expect libpthread or libc.

Tested on x86_64-linux.
gdb/testsuite/gdb.threads/check-libthread-db.exp