Use DW_FORM_exprloc in testsuite Dwarf Assembler for DWARF version 4+.
authorMark Wielaard <mark@klomp.org>
Mon, 14 Dec 2020 16:38:09 +0000 (17:38 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 14 Dec 2020 19:16:33 +0000 (20:16 +0100)
commiteab9267c330046846aa15217da7dcb77f4588220
tree3c252fc5da9996df24b5a7e3289b3164029f528a
parent2f4132646d8dbf8c1a82d63cacbb36ee46a289bb
Use DW_FORM_exprloc in testsuite Dwarf Assembler for DWARF version 4+.

Since DWARF version 4 expressions are represented by DW_FORM_exprloc
instead of a block form. Support this in the testsuite Dwarf Assembler
by setting the SPECIAL_expr form once we know the CU version.

This doesn't change any testsuite results, it just makes the produced
DWARF valid. gdb also accepts expressions in block form for DWARF
version 4 and above, but this is technically incorrect.

gdb/testsuite/ChangeLog:

* lib/dwarf.exp (Dwarf::_read_constants): Don't set
_constants(SPECIAL_expr) here, but set it...
(Dwarf::cu): ...here based on _cu_version.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/dwarf.exp
This page took 0.023643 seconds and 4 git commands to generate.