Set TYPE_LENGTH on a variant part
authorTom Tromey <tom@tromey.com>
Thu, 30 Aug 2018 21:04:03 +0000 (15:04 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 31 Aug 2018 18:59:16 +0000 (12:59 -0600)
commitc8c81635739435a31860ff5f1e49743d80321f43
tree2d78f3c2f17c11c2e8b03280ae38fb7994084a57
parentaef9346c25b0a0c665bce793c00797f5ab82ed37
Set TYPE_LENGTH on a variant part

gdb represents a DW_TAG_variant_part as a union.  While normally DWARF
would not set the size of a DW_TAG_variant_part, gdb's representation
requires the TYPE_LENGTH to be set.

This patch arranges to set the TYPE_LENGTH of a variant part if it has
not already been set.

This fixes some Rust regressions when testing against a version of
rustc that emits DW_TAG_variant_part.

gdb/ChangeLog
2018-08-31  Tom Tromey  <tom@tromey.com>

* dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
variant part type.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.024355 seconds and 4 git commands to generate.