]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-typeprint.c
Have ptype handle types declared pragma Unchecked_Variants.
authorPaul N. Hilfinger <hilfinger@adacore.com>
Mon, 4 Oct 2010 06:37:54 +0000 (06:37 +0000)
committerPaul N. Hilfinger <hilfinger@adacore.com>
Mon, 4 Oct 2010 06:37:54 +0000 (06:37 +0000)
commit83e3a93c83891799c35d89a0de89c2d2b8bb556a
tree3bbd0bf508c279e8fb0ee29d45a147e60bfc7bd4
parent73589123891e1c5ae9ee9c6e359a2a37133200de
Have ptype handle types declared pragma Unchecked_Variants.

When a type is marked with pragma Unchecked_Variants, ptype did not print
variants having a single component, since the compiler produces incorrect
debugging output for such cases.  With this patch, we special-case these
components so that they print.

Changelog:

    * gdb/ada-typeprint.c (print_selected_record_field_types): New function,
    incorporating and generalizing print_record_field_types.
    (print_record_field_types): Change return value and update comment.
    Re-implement using print_selected_record_field_types.
    (print_choices): Print "=>" here.
    Handle case of unencoded variant branch.
    (print_variant_clauses): Reformat comment.
    Special-case unencoded variant branch.
gdb/ChangeLog
gdb/ada-typeprint.c