[RFA v2 4/4] Handle DW_TAG_variant_part and DW_TAG_variant

Joel Brobecker brobecker@adacore.com
Mon Feb 26 06:56:00 GMT 2018


> 2018-02-22  Tom Tromey  <tom@tromey.com>
> 
> 	* dwarf2read.c (struct variant_field): New.
> 	(struct nextfield) <variant>: New field.
> 	(dwarf2_add_field): Handle DW_TAG_variant_part.
> 	(dwarf2_attach_fields_to_type): Attach a discriminant_info to a
> 	discriminated union.
> 	(read_structure_type): Handle DW_TAG_variant_part.
> 	(handle_struct_member_die): New function, extracted from
> 	process_structure_scope.  Handle DW_TAG_variant.
> 	(process_structure_scope): Handle discriminated unions.  Call
> 	handle_struct_member_die.
> 
> 2018-02-22  Tom Tromey  <tom@tromey.com>
> 
> 	* gdb.dwarf2/variant.c: New file.
> 	* gdb.dwarf2/variant.exp: New file.

Looks good to me, Tom. Thanks!

-- 
Joel



More information about the Gdb-patches mailing list