From: Tom de Vries Date: Tue, 2 May 2023 15:37:58 +0000 (+0200) Subject: [gdb/testsuite] Use set in lmap in gdb.dwarf2/dw2-abs-hi-pc.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69330acb2014b3b520206f53a244815226897f9b;p=binutils-gdb.git [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 --- 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