[gdb/testsuite] Fix gdb.threads/stepi-over-clone.exp regexp
I ran into the following FAIL:
...
(gdb) PASS: gdb.threads/stepi-over-clone.exp: catch process syscalls
continue^M
Continuing.^M
^M
Catchpoint 2 (call to syscall clone), clone () at \
../sysdeps/unix/sysv/linux/x86_64/clone.S:78^M
warning: 78 ../sysdeps/unix/sysv/linux/x86_64/clone.S: \
No such file or directory^M
(gdb) FAIL: gdb.threads/stepi-over-clone.exp: continue
...
All but one regexps in the .exp file use "clone\[23\]?" with "?" to
also accept "clone", except the failing case. This commit fixes that
case to also use "?".
Furthermore, there are FAILs like this:
...
(gdb) PASS: gdb.threads/stepi-over-clone.exp: third_thread=false: \
non-stop=on: displaced=off: i=0: continue
stepi^M
[New Thread 0x7ffff7ff8700 (LWP 15301)]^M
Hello from the first thread.^M
78 in ../sysdeps/unix/sysv/linux/x86_64/clone.S^M
(gdb) XXX: Consume the initial command
XXX: Consume new thread line
XXX: Consume first worker thread message
FAIL: gdb.threads/stepi-over-clone.exp: third_thread=false: non-stop=on: \
displaced=off: i=0: stepi
...
because this output is expected instead:
...
Hello from the first thread.^M
0x00000000004212cd in clone3 ()^M
...
The root cause for the difference is the presence of .debug_line info for
clone.
Fix this by updating the relevant regexps.
Tested on x86_64-linux, specifically:
- openSUSE Leap 15.4 (where the FAILs where observed), and
- openSUSE Tumbleweed (where the FAILs where not observed).
Co-Authored-By: Pedro Alves <pedro@palves.net>
Approved-By: Pedro Alves <pedro@palves.net>
Change-Id: I74ca9e7d4cfe6af294fd50e8c509fcbad289b78c