On openSUSE Leap 42.3 with eu-unstrip 0.158, we run into:
...
(gdb) PASS: gdb.base/coredump-filter-build-id.exp: save corefile
First line of eu-unstrip: \
0x400000+0x202000
f4ae8502bd6a14770182382316bc595e9dc6f08b@0x400284 - - [exe]
FAIL: gdb.base/coredump-filter-build-id.exp: gcore dumped mapping with build-id
...
The test expects an actual file name instead of '[exe]', but that only got
introduced with eu-unstrip 0.161. Before it printed '[exe]' or '[pie]'.
Fix this by updating the regexp.
Tested on x86_64-linux.
verbose -log "First line of eu-unstrip: $line"
- if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*[string_to_regexp $binfile]$" $line] } {
+ set binfile_re (?:[string_to_regexp $binfile]|\\\[(?:exe|pie)\\\])
+ if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*$binfile_re$" $line] } {
pass "$test"
} else {
fail "$test"