-/* Output Dwarf format symbol table information from the GNU C compiler.
+/* Output Dwarf format symbol table information from GCC.
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
#define ASM_COMMENT_START ";#"
#endif
-/* How to print out a register name. */
-#ifndef PRINT_REG
-#define PRINT_REG(RTX, CODE, FILE) \
- fprintf ((FILE), "%s", reg_names[REGNO (RTX)])
-#endif
-
/* Define a macro which returns nonzero for any tagged type which is
used (directly or indirectly) in the specification of either some
function's return type or some formal parameter of some function.
/* Forward declarations for functions defined in this file. */
-static void dwarfout_init PARAMS ((const char *));
-static void dwarfout_finish PARAMS ((const char *));
-static void dwarfout_define PARAMS ((unsigned int, const char *));
-static void dwarfout_undef PARAMS ((unsigned int, const char *));
-static void dwarfout_start_source_file PARAMS ((unsigned, const char *));
-static void dwarfout_start_source_file_check PARAMS ((unsigned, const char *));
-static void dwarfout_end_source_file PARAMS ((unsigned));
-static void dwarfout_end_source_file_check PARAMS ((unsigned));
-static void dwarfout_begin_block PARAMS ((unsigned, unsigned));
-static void dwarfout_end_block PARAMS ((unsigned, unsigned));
-static void dwarfout_end_epilogue PARAMS ((unsigned int, const char *));
-static void dwarfout_source_line PARAMS ((unsigned int, const char *));
-static void dwarfout_end_prologue PARAMS ((unsigned int, const char *));
-static void dwarfout_end_function PARAMS ((unsigned int));
-static void dwarfout_function_decl PARAMS ((tree));
-static void dwarfout_global_decl PARAMS ((tree));
-static void dwarfout_deferred_inline_function PARAMS ((tree));
-static void dwarfout_file_scope_decl PARAMS ((tree , int));
-static const char *dwarf_tag_name PARAMS ((unsigned));
-static const char *dwarf_attr_name PARAMS ((unsigned));
-static const char *dwarf_stack_op_name PARAMS ((unsigned));
-static const char *dwarf_typemod_name PARAMS ((unsigned));
-static const char *dwarf_fmt_byte_name PARAMS ((unsigned));
-static const char *dwarf_fund_type_name PARAMS ((unsigned));
-static tree decl_ultimate_origin PARAMS ((tree));
-static tree block_ultimate_origin PARAMS ((tree));
-static tree decl_class_context PARAMS ((tree));
+static void dwarfout_init (const char *);
+static void dwarfout_finish (const char *);
+static void dwarfout_define (unsigned int, const char *);
+static void dwarfout_undef (unsigned int, const char *);
+static void dwarfout_start_source_file (unsigned, const char *);
+static void dwarfout_start_source_file_check (unsigned, const char *);
+static void dwarfout_end_source_file (unsigned);
+static void dwarfout_end_source_file_check (unsigned);
+static void dwarfout_begin_block (unsigned, unsigned);
+static void dwarfout_end_block (unsigned, unsigned);
+static void dwarfout_end_epilogue (unsigned int, const char *);
+static void dwarfout_source_line (unsigned int, const char *);
+static void dwarfout_end_prologue (unsigned int, const char *);
+static void dwarfout_end_function (unsigned int);
+static void dwarfout_function_decl (tree);
+static void dwarfout_global_decl (tree);
+static void dwarfout_deferred_inline_function (tree);
+static void dwarfout_file_scope_decl (tree , int);
+static const char *dwarf_tag_name (unsigned);
+static const char *dwarf_attr_name (unsigned);
+static const char *dwarf_stack_op_name (unsigned);
+static const char *dwarf_typemod_name (unsigned);
+static const char *dwarf_fmt_byte_name (unsigned);
+static const char *dwarf_fund_type_name (unsigned);
+static tree decl_ultimate_origin (tree);
+static tree block_ultimate_origin (tree);
+static tree decl_class_context (tree);
#if 0
-static void output_unsigned_leb128 PARAMS ((unsigned long));
-static void output_signed_leb128 PARAMS ((long));
+static void output_unsigned_leb128 (unsigned long);
+static void output_signed_leb128 (long);
#endif
-static int fundamental_type_code PARAMS ((tree));
-static tree root_type_1 PARAMS ((tree, int));
-static tree root_type PARAMS ((tree));
-static void write_modifier_bytes_1 PARAMS ((tree, int, int, int));
-static void write_modifier_bytes PARAMS ((tree, int, int));
-static inline int type_is_fundamental PARAMS ((tree));
-static void equate_decl_number_to_die_number PARAMS ((tree));
-static inline void equate_type_number_to_die_number PARAMS ((tree));
-static void output_reg_number PARAMS ((rtx));
-static void output_mem_loc_descriptor PARAMS ((rtx));
-static void output_loc_descriptor PARAMS ((rtx));
-static void output_bound_representation PARAMS ((tree, unsigned, int));
-static void output_enumeral_list PARAMS ((tree));
-static inline HOST_WIDE_INT ceiling PARAMS ((HOST_WIDE_INT, unsigned int));
-static inline tree field_type PARAMS ((tree));
-static inline unsigned int simple_type_align_in_bits PARAMS ((tree));
-static inline unsigned HOST_WIDE_INT simple_type_size_in_bits PARAMS ((tree));
-static HOST_WIDE_INT field_byte_offset PARAMS ((tree));
-static inline void sibling_attribute PARAMS ((void));
-static void location_attribute PARAMS ((rtx));
-static void data_member_location_attribute PARAMS ((tree));
-static void const_value_attribute PARAMS ((rtx));
-static void location_or_const_value_attribute PARAMS ((tree));
-static inline void name_attribute PARAMS ((const char *));
-static inline void fund_type_attribute PARAMS ((unsigned));
-static void mod_fund_type_attribute PARAMS ((tree, int, int));
-static inline void user_def_type_attribute PARAMS ((tree));
-static void mod_u_d_type_attribute PARAMS ((tree, int, int));
+static int fundamental_type_code (tree);
+static tree root_type_1 (tree, int);
+static tree root_type (tree);
+static void write_modifier_bytes_1 (tree, int, int, int);
+static void write_modifier_bytes (tree, int, int);
+static inline int type_is_fundamental (tree);
+static void equate_decl_number_to_die_number (tree);
+static inline void equate_type_number_to_die_number (tree);
+static void output_reg_number (rtx);
+static void output_mem_loc_descriptor (rtx);
+static void output_loc_descriptor (rtx);
+static void output_bound_representation (tree, unsigned, char);
+static void output_enumeral_list (tree);
+static inline HOST_WIDE_INT ceiling (HOST_WIDE_INT, unsigned int);
+static inline tree field_type (tree);
+static inline unsigned int simple_type_align_in_bits (tree);
+static inline unsigned HOST_WIDE_INT simple_type_size_in_bits (tree);
+static HOST_WIDE_INT field_byte_offset (tree);
+static inline void sibling_attribute (void);
+static void location_attribute (rtx);
+static void data_member_location_attribute (tree);
+static void const_value_attribute (rtx);
+static void location_or_const_value_attribute (tree);
+static inline void name_attribute (const char *);
+static inline void fund_type_attribute (unsigned);
+static void mod_fund_type_attribute (tree, int, int);
+static inline void user_def_type_attribute (tree);
+static void mod_u_d_type_attribute (tree, int, int);
#ifdef USE_ORDERING_ATTRIBUTE
-static inline void ordering_attribute PARAMS ((unsigned));
+static inline void ordering_attribute (unsigned);
#endif /* defined(USE_ORDERING_ATTRIBUTE) */
-static void subscript_data_attribute PARAMS ((tree));
-static void byte_size_attribute PARAMS ((tree));
-static inline void bit_offset_attribute PARAMS ((tree));
-static inline void bit_size_attribute PARAMS ((tree));
-static inline void element_list_attribute PARAMS ((tree));
-static inline void stmt_list_attribute PARAMS ((const char *));
-static inline void low_pc_attribute PARAMS ((const char *));
-static inline void high_pc_attribute PARAMS ((const char *));
-static inline void body_begin_attribute PARAMS ((const char *));
-static inline void body_end_attribute PARAMS ((const char *));
-static inline void language_attribute PARAMS ((unsigned));
-static inline void member_attribute PARAMS ((tree));
+static void subscript_data_attribute (tree);
+static void byte_size_attribute (tree);
+static inline void bit_offset_attribute (tree);
+static inline void bit_size_attribute (tree);
+static inline void element_list_attribute (tree);
+static inline void stmt_list_attribute (const char *);
+static inline void low_pc_attribute (const char *);
+static inline void high_pc_attribute (const char *);
+static inline void body_begin_attribute (const char *);
+static inline void body_end_attribute (const char *);
+static inline void language_attribute (unsigned);
+static inline void member_attribute (tree);
#if 0
-static inline void string_length_attribute PARAMS ((tree));
+static inline void string_length_attribute (tree);
#endif
-static inline void comp_dir_attribute PARAMS ((const char *));
-static inline void sf_names_attribute PARAMS ((const char *));
-static inline void src_info_attribute PARAMS ((const char *));
-static inline void mac_info_attribute PARAMS ((const char *));
-static inline void prototyped_attribute PARAMS ((tree));
-static inline void producer_attribute PARAMS ((const char *));
-static inline void inline_attribute PARAMS ((tree));
-static inline void containing_type_attribute PARAMS ((tree));
-static inline void abstract_origin_attribute PARAMS ((tree));
+static inline void comp_dir_attribute (const char *);
+static inline void sf_names_attribute (const char *);
+static inline void src_info_attribute (const char *);
+static inline void mac_info_attribute (const char *);
+static inline void prototyped_attribute (tree);
+static inline void producer_attribute (const char *);
+static inline void inline_attribute (tree);
+static inline void containing_type_attribute (tree);
+static inline void abstract_origin_attribute (tree);
#ifdef DWARF_DECL_COORDINATES
-static inline void src_coords_attribute PARAMS ((unsigned, unsigned));
+static inline void src_coords_attribute (unsigned, unsigned);
#endif /* defined(DWARF_DECL_COORDINATES) */
-static inline void pure_or_virtual_attribute PARAMS ((tree));
-static void name_and_src_coords_attributes PARAMS ((tree));
-static void type_attribute PARAMS ((tree, int, int));
-static const char *type_tag PARAMS ((tree));
-static inline void dienum_push PARAMS ((void));
-static inline void dienum_pop PARAMS ((void));
-static inline tree member_declared_type PARAMS ((tree));
-static const char *function_start_label PARAMS ((tree));
-static void output_array_type_die PARAMS ((void *));
-static void output_set_type_die PARAMS ((void *));
+static inline void pure_or_virtual_attribute (tree);
+static void name_and_src_coords_attributes (tree);
+static void type_attribute (tree, int, int);
+static const char *type_tag (tree);
+static inline void dienum_push (void);
+static inline void dienum_pop (void);
+static inline tree member_declared_type (tree);
+static const char *function_start_label (tree);
+static void output_array_type_die (void *);
+static void output_set_type_die (void *);
#if 0
-static void output_entry_point_die PARAMS ((void *));
+static void output_entry_point_die (void *);
#endif
-static void output_inlined_enumeration_type_die PARAMS ((void *));
-static void output_inlined_structure_type_die PARAMS ((void *));
-static void output_inlined_union_type_die PARAMS ((void *));
-static void output_enumeration_type_die PARAMS ((void *));
-static void output_formal_parameter_die PARAMS ((void *));
-static void output_global_subroutine_die PARAMS ((void *));
-static void output_global_variable_die PARAMS ((void *));
-static void output_label_die PARAMS ((void *));
-static void output_lexical_block_die PARAMS ((void *));
-static void output_inlined_subroutine_die PARAMS ((void *));
-static void output_local_variable_die PARAMS ((void *));
-static void output_member_die PARAMS ((void *));
+static void output_inlined_enumeration_type_die (void *);
+static void output_inlined_structure_type_die (void *);
+static void output_inlined_union_type_die (void *);
+static void output_enumeration_type_die (void *);
+static void output_formal_parameter_die (void *);
+static void output_global_subroutine_die (void *);
+static void output_global_variable_die (void *);
+static void output_label_die (void *);
+static void output_lexical_block_die (void *);
+static void output_inlined_subroutine_die (void *);
+static void output_local_variable_die (void *);
+static void output_member_die (void *);
#if 0
-static void output_pointer_type_die PARAMS ((void *));
-static void output_reference_type_die PARAMS ((void *));
+static void output_pointer_type_die (void *);
+static void output_reference_type_die (void *);
#endif
-static void output_ptr_to_mbr_type_die PARAMS ((void *));
-static void output_compile_unit_die PARAMS ((void *));
-static void output_string_type_die PARAMS ((void *));
-static void output_inheritance_die PARAMS ((void *));
-static void output_structure_type_die PARAMS ((void *));
-static void output_local_subroutine_die PARAMS ((void *));
-static void output_subroutine_type_die PARAMS ((void *));
-static void output_typedef_die PARAMS ((void *));
-static void output_union_type_die PARAMS ((void *));
-static void output_unspecified_parameters_die PARAMS ((void *));
-static void output_padded_null_die PARAMS ((void *));
-static void output_die PARAMS ((void (*)(void *), void *));
-static void end_sibling_chain PARAMS ((void));
-static void output_formal_types PARAMS ((tree));
-static void pend_type PARAMS ((tree));
-static int type_ok_for_scope PARAMS ((tree, tree));
-static void output_pending_types_for_scope PARAMS ((tree));
-static void output_type PARAMS ((tree, tree));
-static void output_tagged_type_instantiation PARAMS ((tree));
-static void output_block PARAMS ((tree, int));
-static void output_decls_for_scope PARAMS ((tree, int));
-static void output_decl PARAMS ((tree, tree));
-static void shuffle_filename_entry PARAMS ((filename_entry *));
-static void generate_new_sfname_entry PARAMS ((void));
-static unsigned lookup_filename PARAMS ((const char *));
-static void generate_srcinfo_entry PARAMS ((unsigned, unsigned));
-static void generate_macinfo_entry PARAMS ((unsigned int, rtx,
- const char *));
-static int is_pseudo_reg PARAMS ((rtx));
-static tree type_main_variant PARAMS ((tree));
-static int is_tagged_type PARAMS ((tree));
-static int is_redundant_typedef PARAMS ((tree));
-static void add_incomplete_type PARAMS ((tree));
-static void retry_incomplete_types PARAMS ((void));
+static void output_ptr_to_mbr_type_die (void *);
+static void output_compile_unit_die (void *);
+static void output_string_type_die (void *);
+static void output_inheritance_die (void *);
+static void output_structure_type_die (void *);
+static void output_local_subroutine_die (void *);
+static void output_subroutine_type_die (void *);
+static void output_typedef_die (void *);
+static void output_union_type_die (void *);
+static void output_unspecified_parameters_die (void *);
+static void output_padded_null_die (void *);
+static void output_die (void (*)(void *), void *);
+static void end_sibling_chain (void);
+static void output_formal_types (tree);
+static void pend_type (tree);
+static int type_ok_for_scope (tree, tree);
+static void output_pending_types_for_scope (tree);
+static void output_type (tree, tree);
+static void output_tagged_type_instantiation (tree);
+static void output_block (tree, int);
+static void output_decls_for_scope (tree, int);
+static void output_decl (tree, tree);
+static void shuffle_filename_entry (filename_entry *);
+static void generate_new_sfname_entry (void);
+static unsigned lookup_filename (const char *);
+static void generate_srcinfo_entry (unsigned, unsigned);
+static void generate_macinfo_entry (unsigned int, rtx, const char *);
+static int is_pseudo_reg (rtx);
+static tree type_main_variant (tree);
+static int is_tagged_type (tree);
+static int is_redundant_typedef (tree);
+static void add_incomplete_type (tree);
+static void retry_incomplete_types (void);
\f
/* Definitions of defaults for assembler-dependent names of various
pseudo-ops and section names.
#endif
/* Pseudo-ops for pushing the current section onto the section stack (and
- simultaneously changing to a new section) and for poping back to the
+ simultaneously changing to a new section) and for popping back to the
section we were in immediately before this one. Note that most svr4
assemblers only maintain a one level stack... you can push all the
sections you want, but you can only pop out one level. (The sparc
dwarfout_global_decl,
dwarfout_deferred_inline_function,
debug_nothing_tree, /* outlining_inline_function */
- debug_nothing_rtx /* label */
+ debug_nothing_rtx, /* label */
+ debug_nothing_int /* handle_pch */
};
\f
/************************ general utility functions **************************/
static inline int
-is_pseudo_reg (rtl)
- rtx rtl;
+is_pseudo_reg (rtx rtl)
{
return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER))
|| ((GET_CODE (rtl) == SUBREG)
}
static inline tree
-type_main_variant (type)
- tree type;
+type_main_variant (tree type)
{
type = TYPE_MAIN_VARIANT (type);
/* Return nonzero if the given type node represents a tagged type. */
static inline int
-is_tagged_type (type)
- tree type;
+is_tagged_type (tree type)
{
enum tree_code code = TREE_CODE (type);
}
static const char *
-dwarf_tag_name (tag)
- unsigned tag;
+dwarf_tag_name (unsigned int tag)
{
switch (tag)
{
}
static const char *
-dwarf_attr_name (attr)
- unsigned attr;
+dwarf_attr_name (unsigned int attr)
{
switch (attr)
{
}
static const char *
-dwarf_stack_op_name (op)
- unsigned op;
+dwarf_stack_op_name (unsigned int op)
{
switch (op)
{
}
static const char *
-dwarf_typemod_name (mod)
- unsigned mod;
+dwarf_typemod_name (unsigned int mod)
{
switch (mod)
{
}
static const char *
-dwarf_fmt_byte_name (fmt)
- unsigned fmt;
+dwarf_fmt_byte_name (unsigned int fmt)
{
switch (fmt)
{
}
static const char *
-dwarf_fund_type_name (ft)
- unsigned ft;
+dwarf_fund_type_name (unsigned int ft)
{
switch (ft)
{
served as the original seed for the given block. */
static tree
-decl_ultimate_origin (decl)
- tree decl;
+decl_ultimate_origin (tree decl)
{
#ifdef ENABLE_CHECKING
if (DECL_FROM_INLINE (DECL_ORIGIN (decl)))
served as the original seed for the given block. */
static tree
-block_ultimate_origin (block)
- tree block;
+block_ultimate_origin (tree block)
{
tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);
parameter. */
static tree
-decl_class_context (decl)
- tree decl;
+decl_class_context (tree decl)
{
tree context = NULL_TREE;
if (TREE_CODE (decl) != FUNCTION_DECL || ! DECL_VINDEX (decl))
#if 0
static void
-output_unsigned_leb128 (value)
- unsigned long value;
+output_unsigned_leb128 (unsigned long value)
{
unsigned long orig_value = value;
}
static void
-output_signed_leb128 (value)
- long value;
+output_signed_leb128 (long value)
{
long orig_value = value;
int negative = (value < 0);
draft specification is probably never even useful in practice. */
static int
-fundamental_type_code (type)
- tree type;
+fundamental_type_code (tree type)
{
if (TREE_CODE (type) == ERROR_MARK)
return 0;
qualifiers. */
static tree
-root_type_1 (type, count)
- tree type;
- int count;
+root_type_1 (tree type, int count)
{
/* Give up after searching 1000 levels, in case this is a recursive
pointer type. Such types are possible in Ada, but it is not possible
}
static tree
-root_type (type)
- tree type;
+root_type (tree type)
{
type = root_type_1 (type, 0);
if (type != error_mark_node)
of zero or more Dwarf "type-modifier" bytes applicable to the type. */
static void
-write_modifier_bytes_1 (type, decl_const, decl_volatile, count)
- tree type;
- int decl_const;
- int decl_volatile;
- int count;
+write_modifier_bytes_1 (tree type, int decl_const, int decl_volatile, int count)
{
if (TREE_CODE (type) == ERROR_MARK)
return;
}
static void
-write_modifier_bytes (type, decl_const, decl_volatile)
- tree type;
- int decl_const;
- int decl_volatile;
+write_modifier_bytes (tree type, int decl_const, int decl_volatile)
{
write_modifier_bytes_1 (type, decl_const, decl_volatile, 0);
}
given input type is a Dwarf "fundamental" type. Otherwise return zero. */
static inline int
-type_is_fundamental (type)
- tree type;
+type_is_fundamental (tree type)
{
switch (TREE_CODE (type))
{
UID number. */
static void
-equate_decl_number_to_die_number (decl)
- tree decl;
+equate_decl_number_to_die_number (tree decl)
{
/* In the case where we are generating a DIE for some ..._DECL node
which represents either some inline function declaration or some
UID number. */
static inline void
-equate_type_number_to_die_number (type)
- tree type;
+equate_type_number_to_die_number (tree type)
{
char type_label[MAX_ARTIFICIAL_LABEL_BYTES];
char die_label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-output_reg_number (rtl)
- rtx rtl;
+output_reg_number (rtx rtl)
{
unsigned regno = REGNO (rtl);
if (regno >= DWARF_FRAME_REGISTERS)
{
- warning_with_decl (dwarf_last_decl,
- "internal regno botch: `%s' has regno = %d\n",
- regno);
+ warning ("%Jinternal regno botch: '%D' has regno = %d\n",
+ dwarf_last_decl, dwarf_last_decl, regno);
regno = 0;
}
dw2_assemble_integer (4, GEN_INT (DBX_REGISTER_NUMBER (regno)));
RTL tree, turning it into Dwarf postfix code as it goes. */
static void
-output_mem_loc_descriptor (rtl)
- rtx rtl;
+output_mem_loc_descriptor (rtx rtl)
{
/* Note that for a dynamically sized array, the location we will
generate a description of here will be the lowest numbered location
generate the (dynamic) address of the object onto the address stack. */
static void
-output_loc_descriptor (rtl)
- rtx rtl;
+output_loc_descriptor (rtx rtl)
{
switch (GET_CODE (rtl))
{
}
/* Given a tree node describing an array bound (either lower or upper)
- output a representation for that bound. */
+ output a representation for that bound. DIM_NUM is used for
+ multi-dimensional arrays and U_OR_L designates upper or lower
+ bound. */
static void
-output_bound_representation (bound, dim_num, u_or_l)
- tree bound;
- unsigned dim_num; /* For multi-dimensional arrays. */
- char u_or_l; /* Designates upper or lower bound. */
+output_bound_representation (tree bound, unsigned int dim_num, char u_or_l)
{
switch (TREE_CODE (bound))
{
|| TREE_CODE (bound) == CONVERT_EXPR)
bound = TREE_OPERAND (bound, 0);
- if (TREE_CODE (bound) == SAVE_EXPR
+ if (TREE_CODE (bound) == SAVE_EXPR
&& SAVE_EXPR_RTL (bound))
output_loc_descriptor
(eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX));
enumeration_type_die. */
static void
-output_enumeral_list (link)
- tree link;
+output_enumeral_list (tree link)
{
if (link)
{
which is not less than the value itself. */
static inline HOST_WIDE_INT
-ceiling (value, boundary)
- HOST_WIDE_INT value;
- unsigned int boundary;
+ceiling (HOST_WIDE_INT value, unsigned int boundary)
{
return (((value + boundary - 1) / boundary) * boundary);
}
`integer_type_node' if the given node turns out to be an ERROR_MARK node. */
static inline tree
-field_type (decl)
- tree decl;
+field_type (tree decl)
{
tree type;
BITS_PER_WORD if the node actually turns out to be an ERROR_MARK node. */
static inline unsigned int
-simple_type_align_in_bits (type)
- tree type;
+simple_type_align_in_bits (tree type)
{
return (TREE_CODE (type) != ERROR_MARK) ? TYPE_ALIGN (type) : BITS_PER_WORD;
}
to be an ERROR_MARK node. */
static inline unsigned HOST_WIDE_INT
-simple_type_size_in_bits (type)
- tree type;
+simple_type_size_in_bits (tree type)
{
tree type_size_tree;
(We can't handle the latter case just yet.) */
static HOST_WIDE_INT
-field_byte_offset (decl)
- tree decl;
+field_byte_offset (tree decl)
{
unsigned int type_align_in_bytes;
unsigned int type_align_in_bits;
/* Generate an AT_sibling attribute. */
static inline void
-sibling_attribute ()
+sibling_attribute (void)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
are generated by the routine `data_member_location_attribute' below. */
static void
-location_attribute (rtl)
- rtx rtl;
+location_attribute (rtx rtl)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
(See the `bit_offset_attribute' function below.) */
static void
-data_member_location_attribute (t)
- tree t;
+data_member_location_attribute (tree t)
{
unsigned object_offset_in_bytes;
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
declared constants do not necessarily get memory "homes". */
static void
-const_value_attribute (rtl)
- rtx rtl;
+const_value_attribute (rtx rtl)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
call evaluates to a compile-time constant address. */
static void
-location_or_const_value_attribute (decl)
- tree decl;
+location_or_const_value_attribute (tree decl)
{
rtx rtl;
the value of the attribute. */
static inline void
-name_attribute (name_string)
- const char *name_string;
+name_attribute (const char *name_string)
{
if (name_string && *name_string)
{
}
static inline void
-fund_type_attribute (ft_code)
- unsigned ft_code;
+fund_type_attribute (unsigned int ft_code)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_fund_type);
ASM_OUTPUT_DWARF_FUND_TYPE (asm_out_file, ft_code);
}
static void
-mod_fund_type_attribute (type, decl_const, decl_volatile)
- tree type;
- int decl_const;
- int decl_volatile;
+mod_fund_type_attribute (tree type, int decl_const, int decl_volatile)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static inline void
-user_def_type_attribute (type)
- tree type;
+user_def_type_attribute (tree type)
{
char ud_type_name[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-mod_u_d_type_attribute (type, decl_const, decl_volatile)
- tree type;
- int decl_const;
- int decl_volatile;
+mod_u_d_type_attribute (tree type, int decl_const, int decl_volatile)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
#ifdef USE_ORDERING_ATTRIBUTE
static inline void
-ordering_attribute (ordering)
- unsigned ordering;
+ordering_attribute (unsigned ordering)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_ordering);
ASM_OUTPUT_DWARF_DATA2 (asm_out_file, ordering);
includes information about the element type of type given array type. */
static void
-subscript_data_attribute (type)
- tree type;
+subscript_data_attribute (tree type)
{
unsigned dimension_number;
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-byte_size_attribute (tree_node)
- tree tree_node;
+byte_size_attribute (tree tree_node)
{
unsigned size;
bit-field. (See `byte_size_attribute' above.) */
static inline void
-bit_offset_attribute (decl)
- tree decl;
+bit_offset_attribute (tree decl)
{
HOST_WIDE_INT object_offset_in_bytes = field_byte_offset (decl);
tree type = DECL_BIT_FIELD_TYPE (decl);
which specifies the length in bits of the given field. */
static inline void
-bit_size_attribute (decl)
- tree decl;
+bit_size_attribute (tree decl)
{
/* Must be a field and a bit field. */
if (TREE_CODE (decl) != FIELD_DECL
type. */
static inline void
-element_list_attribute (element)
- tree element;
+element_list_attribute (tree element)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
DIEs with a TAG_compile_unit tag. */
static inline void
-stmt_list_attribute (label)
- const char *label;
+stmt_list_attribute (const char *label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_stmt_list);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
for a subroutine DIE. */
static inline void
-low_pc_attribute (asm_low_label)
- const char *asm_low_label;
+low_pc_attribute (const char *asm_low_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_low_pc);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_low_label);
subroutine DIE. */
static inline void
-high_pc_attribute (asm_high_label)
- const char *asm_high_label;
+high_pc_attribute (const char *asm_high_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_high_pc);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_high_label);
/* Generate an AT_body_begin attribute for a subroutine DIE. */
static inline void
-body_begin_attribute (asm_begin_label)
- const char *asm_begin_label;
+body_begin_attribute (const char *asm_begin_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_begin);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_begin_label);
/* Generate an AT_body_end attribute for a subroutine DIE. */
static inline void
-body_end_attribute (asm_end_label)
- const char *asm_end_label;
+body_end_attribute (const char *asm_end_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_end);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_end_label);
are used only within TAG_compile_unit DIEs. */
static inline void
-language_attribute (language_code)
- unsigned language_code;
+language_attribute (unsigned int language_code)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_language);
ASM_OUTPUT_DWARF_DATA4 (asm_out_file, language_code);
}
static inline void
-member_attribute (context)
- tree context;
+member_attribute (tree context)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
#endif
static inline void
-string_length_attribute (upper_bound)
- tree upper_bound;
+string_length_attribute (tree upper_bound)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
#endif
static inline void
-comp_dir_attribute (dirname)
- const char *dirname;
+comp_dir_attribute (const char *dirname)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_comp_dir);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
}
static inline void
-sf_names_attribute (sf_names_start_label)
- const char *sf_names_start_label;
+sf_names_attribute (const char *sf_names_start_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_sf_names);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
}
static inline void
-src_info_attribute (src_info_start_label)
- const char *src_info_start_label;
+src_info_attribute (const char *src_info_start_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_info);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
}
static inline void
-mac_info_attribute (mac_info_start_label)
- const char *mac_info_start_label;
+mac_info_attribute (const char *mac_info_start_label)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_mac_info);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
}
static inline void
-prototyped_attribute (func_type)
- tree func_type;
+prototyped_attribute (tree func_type)
{
if ((strcmp (lang_hooks.name, "GNU C") == 0)
&& (TYPE_ARG_TYPES (func_type) != NULL))
}
static inline void
-producer_attribute (producer)
- const char *producer;
+producer_attribute (const char *producer)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_producer);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, producer);
}
static inline void
-inline_attribute (decl)
- tree decl;
+inline_attribute (tree decl)
{
if (DECL_INLINE (decl))
{
}
static inline void
-containing_type_attribute (containing_type)
- tree containing_type;
+containing_type_attribute (tree containing_type)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static inline void
-abstract_origin_attribute (origin)
- tree origin;
+abstract_origin_attribute (tree origin)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
#ifdef DWARF_DECL_COORDINATES
static inline void
-src_coords_attribute (src_fileno, src_lineno)
- unsigned src_fileno;
- unsigned src_lineno;
+src_coords_attribute (unsigned src_fileno, unsigned src_lineno)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_coords);
ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_fileno);
#endif /* defined(DWARF_DECL_COORDINATES) */
static inline void
-pure_or_virtual_attribute (func_decl)
- tree func_decl;
+pure_or_virtual_attribute (tree func_decl)
{
if (DECL_VIRTUAL_P (func_decl))
{
given decl, but only if it actually has a name. */
static void
-name_and_src_coords_attributes (decl)
- tree decl;
+name_and_src_coords_attributes (tree decl)
{
tree decl_name = DECL_NAME (decl);
routine writes out these "type descriptor" parts. */
static void
-type_attribute (type, decl_const, decl_volatile)
- tree type;
- int decl_const;
- int decl_volatile;
+type_attribute (tree type, int decl_const, int decl_volatile)
{
enum tree_code code = TREE_CODE (type);
int root_type_modified;
type was declared without a tag. */
static const char *
-type_tag (type)
- tree type;
+type_tag (tree type)
{
const char *name = 0;
}
static inline void
-dienum_push ()
+dienum_push (void)
{
/* Start by checking if the pending_sibling_stack needs to be expanded.
If necessary, expand it. */
{
pending_siblings_allocated += PENDING_SIBLINGS_INCREMENT;
pending_sibling_stack
- = (unsigned *) xrealloc (pending_sibling_stack,
- pending_siblings_allocated * sizeof(unsigned));
+ = xrealloc (pending_sibling_stack,
+ pending_siblings_allocated * sizeof(unsigned));
}
pending_siblings++;
NEXT_DIE_NUM. */
static inline void
-dienum_pop ()
+dienum_pop (void)
{
pending_siblings--;
}
static inline tree
-member_declared_type (member)
- tree member;
+member_declared_type (tree member)
{
return (DECL_BIT_FIELD_TYPE (member))
? DECL_BIT_FIELD_TYPE (member)
in the source file. */
static const char *
-function_start_label (decl)
- tree decl;
+function_start_label (tree decl)
{
rtx x;
const char *fnname;
/* Note that every type of DIE (except a null DIE) gets a sibling. */
static void
-output_array_type_die (arg)
- void *arg;
+output_array_type_die (void *arg)
{
tree type = arg;
}
static void
-output_set_type_die (arg)
- void *arg;
+output_set_type_die (void *arg)
{
tree type = arg;
/* Implement this when there is a GNU FORTRAN or GNU Ada front end. */
static void
-output_entry_point_die (arg)
- void *arg;
+output_entry_point_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
/* Output a DIE to represent an inlined instance of an enumeration type. */
static void
-output_inlined_enumeration_type_die (arg)
- void *arg;
+output_inlined_enumeration_type_die (void *arg)
{
tree type = arg;
/* Output a DIE to represent an inlined instance of a structure type. */
static void
-output_inlined_structure_type_die (arg)
- void *arg;
+output_inlined_structure_type_die (void *arg)
{
tree type = arg;
/* Output a DIE to represent an inlined instance of a union type. */
static void
-output_inlined_union_type_die (arg)
- void *arg;
+output_inlined_union_type_die (void *arg)
{
tree type = arg;
This information is encoded into the element_list attribute. */
static void
-output_enumeration_type_die (arg)
- void *arg;
+output_enumeration_type_die (void *arg)
{
tree type = arg;
formal argument type of some subprogram type. */
static void
-output_formal_parameter_die (arg)
- void *arg;
+output_formal_parameter_die (void *arg)
{
tree node = arg;
or block-local) which has "external linkage" (according to ANSI-C). */
static void
-output_global_subroutine_die (arg)
- void *arg;
+output_global_subroutine_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
or block-local) which has "external linkage" (according to ANSI-C). */
static void
-output_global_variable_die (arg)
- void *arg;
+output_global_variable_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
}
static void
-output_label_die (arg)
- void *arg;
+output_label_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
rtx insn = DECL_RTL (decl);
/* Deleted labels are programmer specified labels which have been
- eliminated because of various optimisations. We still emit them
+ eliminated because of various optimizations. We still emit them
here so that it is possible to put breakpoints on them. */
if (GET_CODE (insn) == CODE_LABEL
|| ((GET_CODE (insn) == NOTE
}
static void
-output_lexical_block_die (arg)
- void *arg;
+output_lexical_block_die (void *arg)
{
tree stmt = arg;
}
static void
-output_inlined_subroutine_die (arg)
- void *arg;
+output_inlined_subroutine_die (void *arg)
{
tree stmt = arg;
or block-local) which has "internal linkage" (according to ANSI-C). */
static void
-output_local_variable_die (arg)
- void *arg;
+output_local_variable_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
}
static void
-output_member_die (arg)
- void *arg;
+output_member_die (void *arg)
{
tree decl = arg;
someday. */
static void
-output_pointer_type_die (arg)
- void *arg;
+output_pointer_type_die (void *arg)
{
tree type = arg;
}
static void
-output_reference_type_die (arg)
- void *arg;
+output_reference_type_die (void *arg)
{
tree type = arg;
#endif
static void
-output_ptr_to_mbr_type_die (arg)
- void *arg;
+output_ptr_to_mbr_type_die (void *arg)
{
tree type = arg;
}
static void
-output_compile_unit_die (arg)
- void *arg;
+output_compile_unit_die (void *arg)
{
const char *main_input_filename = arg;
const char *language_string = lang_hooks.name;
stmt_list_attribute (LINE_BEGIN_LABEL);
{
- const char *wd = getpwd ();
+ const char *wd = get_src_pwd ();
if (wd)
comp_dir_attribute (wd);
}
}
static void
-output_string_type_die (arg)
- void *arg;
+output_string_type_die (void *arg)
{
tree type = arg;
sibling_attribute ();
equate_type_number_to_die_number (type);
member_attribute (TYPE_CONTEXT (type));
- /* this is a fixed length string */
+ /* This is a fixed length string. */
byte_size_attribute (type);
}
static void
-output_inheritance_die (arg)
- void *arg;
+output_inheritance_die (void *arg)
{
- tree binfo = arg;
+ tree binfo = ((tree *)arg)[0];
+ tree access = ((tree *)arg)[1];
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_inheritance);
sibling_attribute ();
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
}
- if (TREE_VIA_PUBLIC (binfo))
+ if (access == access_public_node)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_public);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
}
- else if (TREE_VIA_PROTECTED (binfo))
+ else if (access == access_protected_node)
{
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
}
static void
-output_structure_type_die (arg)
- void *arg;
+output_structure_type_die (void *arg)
{
tree type = arg;
or block-local) which has "internal linkage" (according to ANSI-C). */
static void
-output_local_subroutine_die (arg)
- void *arg;
+output_local_subroutine_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
}
static void
-output_subroutine_type_die (arg)
- void *arg;
+output_subroutine_type_die (void *arg)
{
tree type = arg;
tree return_type = TREE_TYPE (type);
}
static void
-output_typedef_die (arg)
- void *arg;
+output_typedef_die (void *arg)
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
}
static void
-output_union_type_die (arg)
- void *arg;
+output_union_type_die (void *arg)
{
tree type = arg;
at the end of an (ANSI prototyped) formal parameters list. */
static void
-output_unspecified_parameters_die (arg)
- void *arg;
+output_unspecified_parameters_die (void *arg)
{
tree decl_or_type = arg;
}
static void
-output_padded_null_die (arg)
- void *arg ATTRIBUTE_UNUSED;
+output_padded_null_die (void *arg ATTRIBUTE_UNUSED)
{
ASM_OUTPUT_ALIGN (asm_out_file, 2); /* 2**2 == 4 */
}
of the DIE, there must always be a terminator label for the DIE. */
static void
-output_die (die_specific_output_function, param)
- void (*die_specific_output_function) PARAMS ((void *));
- void *param;
+output_die (void (*die_specific_output_function) (void *), void *param)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-end_sibling_chain ()
+end_sibling_chain (void)
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
the formal parameter list. */
static void
-output_formal_types (function_or_method_type)
- tree function_or_method_type;
+output_formal_types (tree function_or_method_type)
{
tree link;
tree formal_type = NULL;
/* Remember a type in the pending_types_list. */
static void
-pend_type (type)
- tree type;
+pend_type (tree type)
{
if (pending_types == pending_types_allocated)
{
pending_types_allocated += PENDING_TYPES_INCREMENT;
pending_types_list
- = (tree *) xrealloc (pending_types_list,
- sizeof (tree) * pending_types_allocated);
+ = xrealloc (pending_types_list,
+ sizeof (tree) * pending_types_allocated);
}
pending_types_list[pending_types++] = type;
true scope of the types we temporarily pended. */
static inline int
-type_ok_for_scope (type, scope)
- tree type;
- tree scope;
+type_ok_for_scope (tree type, tree scope)
{
/* Tagged types (i.e. struct, union, and enum types) must always be
output only in the scopes where they actually belong (or else the
of them too. */
static void
-output_pending_types_for_scope (containing_scope)
- tree containing_scope;
+output_pending_types_for_scope (tree containing_scope)
{
unsigned i;
/* Remember a type in the incomplete_types_list. */
static void
-add_incomplete_type (type)
- tree type;
+add_incomplete_type (tree type)
{
if (incomplete_types == incomplete_types_allocated)
{
incomplete_types_allocated += INCOMPLETE_TYPES_INCREMENT;
incomplete_types_list
- = (tree *) xrealloc (incomplete_types_list,
- sizeof (tree) * incomplete_types_allocated);
+ = xrealloc (incomplete_types_list,
+ sizeof (tree) * incomplete_types_allocated);
}
incomplete_types_list[incomplete_types++] = type;
emit full debugging info for them. */
static void
-retry_incomplete_types ()
+retry_incomplete_types (void)
{
tree type;
}
static void
-output_type (type, containing_scope)
- tree type;
- tree containing_scope;
+output_type (tree type, tree containing_scope)
{
if (type == 0 || type == error_mark_node)
return;
if (COMPLETE_TYPE_P (type))
{
+ tree binfo = TYPE_BINFO (type);
+
/* First output info about the base classes. */
- if (TYPE_BINFO (type) && TYPE_BINFO_BASETYPES (type))
+ if (binfo)
{
- register tree bases = TYPE_BINFO_BASETYPES (type);
- register int n_bases = TREE_VEC_LENGTH (bases);
+ tree bases = BINFO_BASETYPES (binfo);
+ tree accesses = BINFO_BASEACCESSES (binfo);
+ register int n_bases = BINFO_N_BASETYPES (binfo);
register int i;
for (i = 0; i < n_bases; i++)
{
- tree binfo = TREE_VEC_ELT (bases, i);
+ tree arg[2];
+
+ arg[0] = TREE_VEC_ELT (bases, i);
+ arg[1] = (accesses ? TREE_VEC_ELT (accesses, i)
+ : access_public_node);
output_type (BINFO_TYPE (binfo), containing_scope);
- output_die (output_inheritance_die, binfo);
+ output_die (output_inheritance_die, arg);
}
}
}
static void
-output_tagged_type_instantiation (type)
- tree type;
+output_tagged_type_instantiation (tree type)
{
if (type == 0 || type == error_mark_node)
return;
the things which are local to the given block. */
static void
-output_block (stmt, depth)
- tree stmt;
- int depth;
+output_block (tree stmt, int depth)
{
int must_output_die = 0;
tree origin;
a `binding contour') and (recursively) all of it's sub-blocks. */
static void
-output_decls_for_scope (stmt, depth)
- tree stmt;
- int depth;
+output_decls_for_scope (tree stmt, int depth)
{
/* Ignore blocks never really used to make RTL. */
/* Is this a typedef we can avoid emitting? */
static inline int
-is_redundant_typedef (decl)
- tree decl;
+is_redundant_typedef (tree decl)
{
if (TYPE_DECL_IS_STUB (decl))
return 1;
/* Output Dwarf .debug information for a decl described by DECL. */
static void
-output_decl (decl, containing_scope)
- tree decl;
- tree containing_scope;
+output_decl (tree decl, tree containing_scope)
{
/* Make a note of the decl node we are going to be working on. We may
need to give the user the source coordinates of where it appeared in
output_formal_types (TREE_TYPE (decl));
else
{
- /* Generate DIEs to represent all known formal parameters */
+ /* Generate DIEs to represent all known formal parameters. */
tree arg_decls = DECL_ARGUMENTS (decl);
tree parm;
if (fn_arg_types)
{
- /* this is the prototyped case, check for ... */
+ /* This is the prototyped case, check for.... */
if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node)
output_die (output_unspecified_parameters_die, decl);
}
else
{
- /* this is unprototyped, check for undefined (just declaration) */
+ /* This is unprototyped, check for undefined (just declaration). */
if (!DECL_INITIAL (decl))
output_die (output_unspecified_parameters_die, decl);
}
function. */
{
- void (*func) PARAMS ((void *));
+ void (*func) (void *);
register tree origin = decl_ultimate_origin (decl);
if (origin != NULL && TREE_CODE (origin) == PARM_DECL)
\f
/* Output debug information for a function. */
static void
-dwarfout_function_decl (decl)
- tree decl;
+dwarfout_function_decl (tree decl)
{
dwarfout_file_scope_decl (decl, 0);
}
/* Debug information for a global DECL. Called from toplev.c after
compilation proper has finished. */
static void
-dwarfout_global_decl (decl)
- tree decl;
+dwarfout_global_decl (tree decl)
{
/* Output DWARF information for file-scope tentative data object
declarations, file-scope (extern) function declarations (which
being output at this point. (We're putting that off until we need
to do it.) */
static void
-dwarfout_deferred_inline_function (decl)
- tree decl;
+dwarfout_deferred_inline_function (tree decl)
{
/* Generate the DWARF info for the "abstract" instance of a function
which we may later generate inlined and/or out-of-line instances
}
static void
-dwarfout_file_scope_decl (decl, set_finalizing)
- tree decl;
- int set_finalizing;
+dwarfout_file_scope_decl (tree decl, int set_finalizing)
{
if (TREE_CODE (decl) == ERROR_MARK)
return;
normal built-in types for the language we are compiling, except
in cases where the types in question are *not* DWARF fundamental
types. We make an exception in the case of non-fundamental types
- for the sake of objective C (and perhaps C++) because the GNU
+ for the sake of Objective-C (and perhaps C++) because the GNU
front-ends for these languages may in fact create certain "built-in"
types which are (for example) RECORD_TYPEs. In such cases, we
really need to output these (non-fundamental) types because other
for a lexical block. */
static void
-dwarfout_begin_block (line, blocknum)
- unsigned int line ATTRIBUTE_UNUSED;
- unsigned int blocknum;
+dwarfout_begin_block (unsigned int line ATTRIBUTE_UNUSED,
+ unsigned int blocknum)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
for a lexical block. */
static void
-dwarfout_end_block (line, blocknum)
- unsigned int line ATTRIBUTE_UNUSED;
- unsigned int blocknum;
+dwarfout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int blocknum)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
to their home locations). */
static void
-dwarfout_end_prologue (line, file)
- unsigned int line ATTRIBUTE_UNUSED;
- const char *file ATTRIBUTE_UNUSED;
+dwarfout_end_prologue (unsigned int line ATTRIBUTE_UNUSED,
+ const char *file ATTRIBUTE_UNUSED)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
the real body of the function ends (just before the epilogue code). */
static void
-dwarfout_end_function (line)
- unsigned int line ATTRIBUTE_UNUSED;
+dwarfout_end_function (unsigned int line ATTRIBUTE_UNUSED)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
has been generated. */
static void
-dwarfout_end_epilogue (line, file)
- unsigned int line ATTRIBUTE_UNUSED;
- const char *file ATTRIBUTE_UNUSED;
+dwarfout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
+ const char *file ATTRIBUTE_UNUSED)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-shuffle_filename_entry (new_zeroth)
- filename_entry *new_zeroth;
+shuffle_filename_entry (filename_entry *new_zeroth)
{
filename_entry temp_entry;
filename_entry *limit_p;
/* Create a new (string) entry for the .debug_sfnames section. */
static void
-generate_new_sfname_entry ()
+generate_new_sfname_entry (void)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
before them.) */
static unsigned
-lookup_filename (file_name)
- const char *file_name;
+lookup_filename (const char *file_name)
{
filename_entry *search_p;
filename_entry *limit_p = &filename_table[ft_entries];
{
ft_entries_allocated += FT_ENTRIES_INCREMENT;
filename_table
- = (filename_entry *)
- xrealloc (filename_table,
+ = xrealloc (filename_table,
ft_entries_allocated * sizeof (filename_entry));
}
}
static void
-generate_srcinfo_entry (line_entry_num, files_entry_num)
- unsigned line_entry_num;
- unsigned files_entry_num;
+generate_srcinfo_entry (unsigned int line_entry_num, unsigned int files_entry_num)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
}
static void
-dwarfout_source_line (line, filename)
- unsigned int line;
- const char *filename;
+dwarfout_source_line (unsigned int line, const char *filename)
{
if (debug_info_level >= DINFO_LEVEL_NORMAL
/* We can't emit line number info for functions in separate sections,
/* Generate an entry in the .debug_macinfo section. */
static void
-generate_macinfo_entry (type, offset, string)
- unsigned int type;
- rtx offset;
- const char *string;
+generate_macinfo_entry (unsigned int type, rtx offset, const char *string)
{
if (! use_gnu_debug_info_extensions)
return;
/* Wrapper for toplev.c callback to check debug info level. */
static void
-dwarfout_start_source_file_check (line, filename)
- unsigned int line;
- const char *filename;
+dwarfout_start_source_file_check (unsigned int line, const char *filename)
{
if (debug_info_level == DINFO_LEVEL_VERBOSE)
dwarfout_start_source_file (line, filename);
}
static void
-dwarfout_start_source_file (line, filename)
- unsigned int line ATTRIBUTE_UNUSED;
- const char *filename;
+dwarfout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
+ const char *filename)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
const char *label1, *label2;
/* Wrapper for toplev.c callback to check debug info level. */
static void
-dwarfout_end_source_file_check (lineno)
- unsigned lineno;
+dwarfout_end_source_file_check (unsigned int lineno)
{
if (debug_info_level == DINFO_LEVEL_VERBOSE)
dwarfout_end_source_file (lineno);
}
static void
-dwarfout_end_source_file (lineno)
- unsigned lineno;
+dwarfout_end_source_file (unsigned int lineno)
{
generate_macinfo_entry (MACINFO_resume, GEN_INT (lineno), "");
}
whitespace part. */
static void
-dwarfout_define (lineno, buffer)
- unsigned lineno;
- const char *buffer;
+dwarfout_define (unsigned int lineno, const char *buffer)
{
static int initialized = 0;
whitespace part. */
static void
-dwarfout_undef (lineno, buffer)
- unsigned lineno;
- const char *buffer;
+dwarfout_undef (unsigned int lineno, const char *buffer)
{
generate_macinfo_entry (MACINFO_undef, GEN_INT (lineno), buffer);
}
/* Set up for Dwarf output at the start of compilation. */
static void
-dwarfout_init (main_input_filename)
- const char *main_input_filename;
+dwarfout_init (const char *main_input_filename)
{
warning ("support for the DWARF1 debugging format is deprecated");
/* Allocate the initial hunk of the pending_sibling_stack. */
pending_sibling_stack
- = (unsigned *)
- xmalloc (PENDING_SIBLINGS_INCREMENT * sizeof (unsigned));
+ = xmalloc (PENDING_SIBLINGS_INCREMENT * sizeof (unsigned));
pending_siblings_allocated = PENDING_SIBLINGS_INCREMENT;
pending_siblings = 1;
/* Allocate the initial hunk of the filename_table. */
- filename_table
- = (filename_entry *)
- xmalloc (FT_ENTRIES_INCREMENT * sizeof (filename_entry));
+ filename_table = xmalloc (FT_ENTRIES_INCREMENT * sizeof (filename_entry));
ft_entries_allocated = FT_ENTRIES_INCREMENT;
ft_entries = 0;
/* Allocate the initial hunk of the pending_types_list. */
- pending_types_list
- = (tree *) xmalloc (PENDING_TYPES_INCREMENT * sizeof (tree));
+ pending_types_list = xmalloc (PENDING_TYPES_INCREMENT * sizeof (tree));
pending_types_allocated = PENDING_TYPES_INCREMENT;
pending_types = 0;
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
{
- const char *pwd = getpwd ();
+ const char *pwd = get_src_pwd ();
char *dirname;
if (!pwd)
- fatal_io_error ("can't get current directory");
+ fatal_error ("can't get current directory: %m");
dirname = concat (pwd, "/", NULL);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, DEBUG_BEGIN_LABEL);
- output_die (output_compile_unit_die, (PTR) main_input_filename);
+ output_die (output_compile_unit_die, (void *) main_input_filename);
ASM_OUTPUT_POP_SECTION (asm_out_file);
fputc ('\n', asm_out_file);
/* Output stuff that dwarf requires at the end of every file. */
static void
-dwarfout_finish (main_input_filename)
- const char *main_input_filename ATTRIBUTE_UNUSED;
+dwarfout_finish (const char *main_input_filename ATTRIBUTE_UNUSED)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];