mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-23 14:14:56 +08:00
[gdb/testsuite] Use string_to_regexp on core filename in gdb_core_cmd
In commit 1281424ccf "[gdb/testsuite] Fix core file load FAIL in tls-core.exp", I've made this change: ... - -re ": No such file or directory.*\r\n$gdb_prompt $" { + -re "$core: No such file or directory.*\r\n$gdb_prompt $" { ... However, the $core variable contains a filename which needs to be matched as a literal string, not as a regexp. Fix this by using string_to_regexp. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-03-12 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (gdb_core_cmd): Use string_to_regexp for regexp-matching $core.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2020-03-12 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* lib/gdb.exp (gdb_core_cmd): Use string_to_regexp for regexp-matching
|
||||
$core.
|
||||
|
||||
2020-03-12 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* lib/gdb.exp (gdb_core_cmd): Make "No such file or directory" regexp
|
||||
|
@ -4648,7 +4648,7 @@ proc gdb_core_cmd { core test } {
|
||||
fail "$test (bad file format)"
|
||||
return -1
|
||||
}
|
||||
-re "$core: No such file or directory.*\r\n$gdb_prompt $" {
|
||||
-re -wrap "[string_to_regexp $core]: No such file or directory.*" {
|
||||
fail "$test (file not found)"
|
||||
return -1
|
||||
}
|
||||
|
Reference in New Issue
Block a user