[gdb/testsuite] Fix ERROR in expect_build_id_in_core_file

With test-case gdb.python/py-corefile.exp I run into:
...
PASS: $exp: test mapped files data: show-build-ids
ERROR: tcl error sourcing gdb.python/py-corefile.exp.
ERROR: bad option "0x1fa178": \
  must be -nobackslashes, -nocommands, or -novariables
    while executing
"subst 0x$offset + 0"
...

Fix this using "[subst 0x$offset]" instead.

Tested on x86_64-linux.
This commit is contained in:
Tom de Vries
2025-10-08 22:08:49 +02:00
parent aa99a69e9e
commit 733ccb8b3f

View File

@@ -11635,7 +11635,7 @@ proc expect_build_id_in_core_file { filename } {
}
# Convert OFFSET to decimal.
set offset [expr {[subst 0x$offset + 0]}]
set offset [expr {[subst 0x$offset]}]
# Now figure out the page size. This should be fine for Linux
# hosts, see the istarget check above.