From: Tom de Vries Date: Wed, 8 Oct 2025 20:08:49 +0000 (+0200) Subject: [gdb/testsuite] Fix ERROR in expect_build_id_in_core_file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=733ccb8b3fd5422606d5c1ebeba246fa89c8f9ae;p=thirdparty%2Fbinutils-gdb.git [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. --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 077a7b5893e..ef6a8f859ef 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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.