From: Tom de Vries Date: Wed, 18 Oct 2023 06:26:20 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.base/jit-bfd-name.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6d3616fb3c0f0ce176b8d916f12fd65f3d9b318;p=binutils-gdb.git [gdb/testsuite] Fix gdb.base/jit-bfd-name.exp When running test-case gdb.base/jit-bfd-name.exp, I run into: ... ERROR: tcl error sourcing gdb/testsuite/gdb.base/jit-bfd-name.exp. ERROR: can't read "start": no such variable ... The problem is that commit c96ceed9dce ("gdb: include the end address in in-memory bfd filenames") introduced a use of variable start, but not a definition. Fix this by adding the missing definition. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.base/jit-bfd-name.exp b/gdb/testsuite/gdb.base/jit-bfd-name.exp index f6a6e765338..f4886a698ef 100644 --- a/gdb/testsuite/gdb.base/jit-bfd-name.exp +++ b/gdb/testsuite/gdb.base/jit-bfd-name.exp @@ -135,7 +135,7 @@ foreach addr $symfile_addrs len $symfile_lengths { set count 1 foreach addr $symfile_addrs len $symfile_lengths { # Drop any loading zeros from the symfile address. - set addr [format 0x%x $addr] + set start [format 0x%x $addr] # Calculate the end address. set end [format 0x%x [expr $addr + $len]]