[gdb/testsuite] Use unique files in gdb.dwarf2/dw2-lines.exp
authorTom de Vries <tdevries@suse.de>
Mon, 29 Nov 2021 08:51:10 +0000 (09:51 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 29 Nov 2021 08:51:10 +0000 (09:51 +0100)
commit2a0fa84217cc3ec874f2f924510c7543358bca9c
tree21a62e3174dfa532b8f70b1deb130edba6e5f33a
parent97b3f4e86f7a25e0767487d72cb3977fd653b5bc
[gdb/testsuite] Use unique files in gdb.dwarf2/dw2-lines.exp

While debugging a problem in gdb.dwarf2/dw2-lines.exp, I realized that the
test-case generates all executables and associated temporary files using the
same filenames.

Fix this by adding a new proc prefix_id in lib/gdb.exp, and using it in the
test-case.

Tested on x86_64-linux.
gdb/testsuite/gdb.dwarf2/dw2-lines.exp
gdb/testsuite/lib/gdb.exp