so we use an intermediate step for standard DWARF. */
if (debug_info_p)
{
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
- SET_TYPE_DEBUG_TYPE (gnu_type, gnu_field_type);
- else if (DECL_PARALLEL_TYPE (t))
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
add_parallel_type (gnu_type, DECL_PARALLEL_TYPE (t));
+ else
+ SET_TYPE_DEBUG_TYPE (gnu_type, gnu_field_type);
}
}
implementation type. But, in any case, mark it as artificial so
the debugger can skip it. */
const Entity_Id gnat_name
- = Present (PAT) && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL
+ = Present (PAT) && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL
? PAT
: gnat_entity;
tree xup_name
- = gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL
+ = gnat_encodings == DWARF_GNAT_ENCODINGS_ALL
? create_concat_name (gnat_name, "XUP")
: gnu_entity_name;
create_type_decl (xup_name, gnu_fat_type, true, debug_info_p,
template at a negative offset, but this was somewhat of a kludge; we
now shift thin pointer values explicitly but only those which have a
TYPE_UNCONSTRAINED_ARRAY attached to the designated RECORD_TYPE.
- Note that GDB can handle standard DWARF information for them, so we
- don't have to name them as a GNAT encoding, except if specifically
- asked to. */
+ If the GNAT encodings are used, give it a name. */
tree xut_name
- = (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ = (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
? create_concat_name (gnat_name, "XUT")
: gnu_entity_name;
obj = build_unc_object_type (gnu_template_type, tem, xut_name,
&& TREE_CODE (TREE_TYPE (gnu_index_type))
!= INTEGER_TYPE)
|| TYPE_BIASED_REPRESENTATION_P (gnu_index_type))
- && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
need_index_type_struct = true;
}
gnu_entity_name = gnu_name;
}
- else if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ else if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree gnu_base_decl
= gnat_to_gnu_entity (Etype (gnat_entity), NULL_TREE,
save_gnu_tree (gnat_entity, NULL_TREE, false);
/* Set the ___XP suffix for GNAT encodings. */
- if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
gnu_entity_name = DECL_NAME (TYPE_NAME (gnu_type));
tree gnu_inner = gnu_type;
= build_subst_list (gnat_entity, gnat_parent_type, definition);
/* Set the layout of the type to match that of the parent type,
- doing required substitutions. If we are in minimal GNAT
- encodings mode, we don't need debug info for the inner record
+ doing required substitutions. Note that, if we do not use the
+ GNAT encodings, we don't need debug info for the inner record
types, as they will be part of the embedding variant record's
debug info. */
copy_and_substitute_in_layout
(gnat_entity, gnat_parent_type, gnu_type, gnu_parent_type,
gnu_subst_list,
- debug_info_p && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL);
+ debug_info_p && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL);
}
else
{
annotate_rep (gnat_entity, gnu_type);
/* If debugging information is being written for the type and if
- we are asked to output such encodings, write a record that
+ we are asked to output GNAT encodings, write a record that
shows what we are a subtype of and also make a variable that
indicates our size, if still variable. */
if (debug_info_p
- && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree gnu_subtype_marker = make_node (RECORD_TYPE);
tree gnu_unpad_base_name
true, true, NULL, gnat_entity, false);
}
- /* Or else, if the subtype is artificial and encodings are not
- used, use the base record type as the debug type. */
+ /* Or else, if the subtype is artificial and GNAT encodings are
+ not used, use the base record type as the debug type. */
else if (debug_info_p
&& artificial_p
- && gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ && gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
SET_TYPE_DEBUG_TYPE (gnu_type, gnu_unpad_base_type);
}
we must be careful because we do not generate debug info for external
variables so DECL_IGNORED_P is not stable across units. */
if (need_for_debug
- && gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL
+ && gnat_encodings != DWARF_GNAT_ENCODINGS_ALL
&& (TREE_CONSTANT (gnu_expr)
|| (!expr_public_p
&& DECL_P (gnu_expr)
tree *p_gnu_rep_list)
{
const bool needs_xv_encodings
- = debug_info && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL;
+ = debug_info && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL;
bool all_rep_and_size = all_rep && TYPE_SIZE (gnu_record_type);
bool variants_have_rep = all_rep;
bool layout_with_rep = false;
gcc_assert (TYPE_IMPL_PACKED_ARRAY_P (gnu_type));
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
+ {
+ add_parallel_type (gnu_type, gnu_original_array_type);
+ return NULL_TREE;
+ }
+ else
{
SET_TYPE_ORIGINAL_PACKED_ARRAY (gnu_type, gnu_original_array_type);
original_name = DECL_NAME (original_name);
return original_name;
}
- else
- {
- add_parallel_type (gnu_type, gnu_original_array_type);
- return NULL_TREE;
- }
}
/* Given a type T, a FIELD_DECL F, and a replacement value R, return an
finish_record_type (new_type, nreverse (new_field_list), 2, false);
relate_alias_sets (new_type, type, ALIAS_SET_COPY);
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
SET_TYPE_DEBUG_TYPE (new_type, TYPE_DEBUG_TYPE (type));
else if (TYPE_STUB_DECL (type))
SET_DECL_PARALLEL_TYPE (TYPE_STUB_DECL (new_type),
}
/* Make the inner type the debug type of the padded type. */
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
SET_TYPE_DEBUG_TYPE (record, maybe_debug_type (type));
/* Unless debugging information isn't being written for the input type,
/* There is no need to show what we are a subtype of when outputting as
few encodings as possible: regular debugging infomation makes this
redundant. */
- if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree marker = make_node (RECORD_TYPE);
tree orig_name = TYPE_IDENTIFIER (type);
/* If this record type is of variable size, make a parallel record type that
will tell the debugger how the former is laid out (see exp_dbug.ads). */
- if (var_size && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (var_size && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree new_record_type
= make_node (TREE_CODE (record_type) == QUAL_UNION_TYPE