debug_nothing_int_int, /* begin_block */
debug_nothing_int_int, /* end_block */
debug_true_const_tree, /* ignore_block */
- dwarf2out_source_line, /* source_line */
+ dwarf2out_source_line, /* source_line */
debug_nothing_int_charstar, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
debug_nothing_int_charstar, /* begin_epilogue */
dw_attr_node *a;
bool inline_found = false;
int n_location = 0, n_low_pc = 0, n_high_pc = 0, n_artificial = 0;
- int n_decl_line = 0, n_decl_file = 0;
+ int n_decl_line = 0, n_decl_column = 0, n_decl_file = 0;
FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
{
switch (a->dw_attr)
case DW_AT_artificial:
++n_artificial;
break;
+ case DW_AT_decl_column:
+ ++n_decl_column;
+ break;
case DW_AT_decl_line:
++n_decl_line;
break;
}
}
if (n_location > 1 || n_low_pc > 1 || n_high_pc > 1 || n_artificial > 1
- || n_decl_line > 1 || n_decl_file > 1)
+ || n_decl_column > 1 || n_decl_line > 1 || n_decl_file > 1)
{
fprintf (stderr, "Duplicate attributes in DIE:\n");
debug_dwarf_die (die);
s = expand_location (DECL_SOURCE_LOCATION (decl));
add_AT_file (die, DW_AT_decl_file, lookup_filename (s.file));
add_AT_unsigned (die, DW_AT_decl_line, s.line);
+ if (debug_column_info && s.column)
+ add_AT_unsigned (die, DW_AT_decl_column, s.column);
}
/* Add DW_AT_{,MIPS_}linkage_name attribute for the given decl. */
&& (DECL_ARTIFICIAL (decl)
|| (get_AT_file (old_die, DW_AT_decl_file) == file_index
&& (get_AT_unsigned (old_die, DW_AT_decl_line)
- == (unsigned) s.line))))
+ == (unsigned) s.line)
+ && (!debug_column_info
+ || s.column == 0
+ || (get_AT_unsigned (old_die, DW_AT_decl_column)
+ == (unsigned) s.column)))))
{
subr_die = old_die;
add_AT_file (subr_die, DW_AT_decl_file, file_index);
if (get_AT_unsigned (old_die, DW_AT_decl_line) != (unsigned) s.line)
add_AT_unsigned (subr_die, DW_AT_decl_line, s.line);
+ if (debug_column_info
+ && s.column
+ && (get_AT_unsigned (old_die, DW_AT_decl_column)
+ != (unsigned) s.column))
+ add_AT_unsigned (subr_die, DW_AT_decl_column, s.column);
/* If the prototype had an 'auto' or 'decltype(auto)' return type,
emit the real type on the definition die. */
- if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE)
+ if (is_cxx () && debug_info_level > DINFO_LEVEL_TERSE)
{
dw_die_ref die = get_AT_ref (old_die, DW_AT_type);
if (die == auto_die || die == decltype_auto_die)
if (get_AT_unsigned (old_die, DW_AT_decl_line) != (unsigned) s.line)
add_AT_unsigned (var_die, DW_AT_decl_line, s.line);
+ if (debug_column_info
+ && s.column
+ && (get_AT_unsigned (old_die, DW_AT_decl_column)
+ != (unsigned) s.column))
+ add_AT_unsigned (var_die, DW_AT_decl_column, s.column);
+
if (old_die->die_tag == DW_TAG_member)
add_linkage_name (var_die, decl);
}
{
add_AT_file (die, DW_AT_call_file, lookup_filename (s.file));
add_AT_unsigned (die, DW_AT_call_line, s.line);
+ if (debug_column_info && s.column)
+ add_AT_unsigned (die, DW_AT_call_column, s.column);
}
}
add_AT_file (imported_die, DW_AT_decl_file, lookup_filename (xloc.file));
add_AT_unsigned (imported_die, DW_AT_decl_line, xloc.line);
+ if (debug_column_info && xloc.column)
+ add_AT_unsigned (imported_die, DW_AT_decl_column, xloc.column);
if (name)
add_AT_string (imported_die, DW_AT_name,
IDENTIFIER_POINTER (name));
{
dw_attr_node *prev = &(*die->die_attr)[ix - 1];
- if (prev->dw_attr == DW_AT_decl_line || prev->dw_attr == DW_AT_name)
+ if (prev->dw_attr == DW_AT_decl_line
+ || prev->dw_attr == DW_AT_decl_column
+ || prev->dw_attr == DW_AT_name)
break;
}