[gdb/testsuite] Add aranges to gdb.dwarf2/dw2-dir-file-name.exp
authorTom de Vries <tdevries@suse.de>
Fri, 30 Sep 2022 03:58:43 +0000 (05:58 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 30 Sep 2022 03:58:43 +0000 (05:58 +0200)
commit511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed
tree8eb90019a2a5f194d12afa25b3f1914184a70f2a
parent137c886e9a624f68cba212ebdb156298957c25c4
[gdb/testsuite] Add aranges to gdb.dwarf2/dw2-dir-file-name.exp

Since commit 52b920c5d20 ("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp
for ppc64le"), the test-case fails with target board cc-with-debug-names, due
to missing .debug_aranges info.

Add the missing .debug_aranges info.

Also add a file_id option to Dwarf::assemble, to make it possible to contribute
to an already open file.

Tested on x86_64-linux.
gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
gdb/testsuite/lib/dwarf.exp