From b6d3616fb3c0f0ce176b8d916f12fd65f3d9b318 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 18 Oct 2023 08:26:20 +0200 Subject: [PATCH] [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. --- gdb/testsuite/gdb.base/jit-bfd-name.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]] -- 2.30.2