[gdb/testsuite] Add basic lmap for tcl < 8.6
authorTom de Vries <tdevries@suse.de>
Mon, 24 Apr 2023 12:48:06 +0000 (14:48 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 24 Apr 2023 12:48:06 +0000 (14:48 +0200)
commitddbc483e7dc2266296caff17990b5b896d15095f
tree57173e47d2d02c3140e157560c77eb921f38906d
parentf355e1e44e6b5ff9755892dfb326df370bce3354
[gdb/testsuite] Add basic lmap for tcl < 8.6

With test-case gdb.dwarf2/dw2-abs-hi-pc.exp and tcl 8.5, I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp.
ERROR: invalid command name "lmap"
    while executing
"::gdb_tcl_unknown lmap i {dw2-abs-hi-pc.c dw2-abs-hi-pc-hello.c \
  dw2-abs-hi-pc-world.c} { expr { "$srcdir/$subdir/$i" } }"
...

Fix this by adding basic lmap support for tcl version < 8.6.

Tested on x86_64-linux.
gdb/testsuite/gdb.testsuite/lmap.exp [new file with mode: 0644]
gdb/testsuite/lib/gdb.exp