]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix gdb.base/dlmopen.exp on native-gdbserver
authorTom de Vries <tdevries@suse.de>
Thu, 14 Aug 2025 20:31:06 +0000 (22:31 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 14 Aug 2025 20:31:06 +0000 (22:31 +0200)
commit7d6d4f69fe59b1102cbbd64ffaec33f8d18b642b
tree9a2ef15b15984f7f003a9c46f8a726fae619c3a0
parent2e917d2873a4ebffb1b7e8a8c043af65dfb5b708
[gdb/testsuite] Fix gdb.base/dlmopen.exp on native-gdbserver

With test-case gdb.base/dlmopen.exp and target board native-gdbserver, I get:
...
(gdb) info breakpoints 3^M
Num     Type           Disp Enb Address            What^M
3       breakpoint     keep y   0x00007ffff7fc8000 ^M
        stop only if (0) (target evals)^M
(gdb) FAIL: $exp: test_solib_unmap_events: check b/p status
...

The problem is that the regexp doesn't allow for the "(target evals)" part:
...
-re -wrap "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$::hex\\s*\[^\r\n\]+\r\n\\s+stop o
nly if \\(0\\)" {
...

Fix this by updating the regexp.

While we're at it:
- rewrite the regexp using multiline, string_to_regexp, join and string cat to
  make it more readable, and
- remove the redundant failure clause from the same gdb_test_multiple.

Tested on x86_64-linux using make-check-all.sh.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/dlmopen.exp