]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix ERROR in expect_build_id_in_core_file
authorTom de Vries <tdevries@suse.de>
Wed, 8 Oct 2025 20:08:49 +0000 (22:08 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 8 Oct 2025 20:08:49 +0000 (22:08 +0200)
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.

gdb/testsuite/lib/gdb.exp

index 077a7b5893e2bb3ca00b7e38e47c18076896fdf2..ef6a8f859eff0ab3631707cf876810b64d87059d 100644 (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.