From 69330acb2014b3b520206f53a244815226897f9b Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 2 May 2023 17:37:58 +0200 Subject: [PATCH] [gdb/testsuite] Use set in lmap in gdb.dwarf2/dw2-abs-hi-pc.exp In gdb.dwarf2/dw2-abs-hi-pc.exp we do: ... set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }] ... The use of expr is not idiomatic. Fix this by using set instead: ... set sources [lmap i $sources { set tmp $srcdir/$subdir/$i }] ... Reported-By: Tom Tromey Reviewed-By: Andreas Schwab --- gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp index 2ea6a5cea00..5b5d678ec7a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp @@ -24,7 +24,7 @@ set sources \ ${testfile}.c \ ${testfile}-hello.c \ ${testfile}-world.c] -set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }] +set sources [lmap i $sources { set tmp $srcdir/$subdir/$i }] lassign [function_range hello $sources] \ hello_start hello_len -- 2.30.2