Deleted Added
full compact
dwarf2out.c (259563) dwarf2out.c (259947)
1/* Output Dwarf2 format symbol table information from GCC.
2 Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 Contributed by Gary Funck (gary@intrepid.com).
5 Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
6 Extensively modified by Jason Merrill (jason@cygnus.com).
7
8This file is part of GCC.

--- 5727 unchanged lines hidden (view full) ---

5736static void
5737print_die (dw_die_ref die, FILE *outfile)
5738{
5739 dw_attr_ref a;
5740 dw_die_ref c;
5741 unsigned ix;
5742
5743 print_spaces (outfile);
1/* Output Dwarf2 format symbol table information from GCC.
2 Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 Contributed by Gary Funck (gary@intrepid.com).
5 Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
6 Extensively modified by Jason Merrill (jason@cygnus.com).
7
8This file is part of GCC.

--- 5727 unchanged lines hidden (view full) ---

5736static void
5737print_die (dw_die_ref die, FILE *outfile)
5738{
5739 dw_attr_ref a;
5740 dw_die_ref c;
5741 unsigned ix;
5742
5743 print_spaces (outfile);
5744 fprintf (outfile, "DIE %4lu: %s\n",
5744 fprintf (outfile, "DIE %4ld: %s\n",
5745 die->die_offset, dwarf_tag_name (die->die_tag));
5746 print_spaces (outfile);
5747 fprintf (outfile, " abbrev id: %lu", die->die_abbrev);
5745 die->die_offset, dwarf_tag_name (die->die_tag));
5746 print_spaces (outfile);
5747 fprintf (outfile, " abbrev id: %lu", die->die_abbrev);
5748 fprintf (outfile, " offset: %lu\n", die->die_offset);
5748 fprintf (outfile, " offset: %ld\n", die->die_offset);
5749
5750 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
5751 {
5752 print_spaces (outfile);
5753 fprintf (outfile, " %s: ", dwarf_attr_name (a->dw_attr));
5754
5755 switch (AT_class (a))
5756 {

--- 31 unchanged lines hidden (view full) ---

5788 fprintf (outfile, "%u", AT_flag (a));
5789 break;
5790 case dw_val_class_die_ref:
5791 if (AT_ref (a) != NULL)
5792 {
5793 if (AT_ref (a)->die_symbol)
5794 fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol);
5795 else
5749
5750 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
5751 {
5752 print_spaces (outfile);
5753 fprintf (outfile, " %s: ", dwarf_attr_name (a->dw_attr));
5754
5755 switch (AT_class (a))
5756 {

--- 31 unchanged lines hidden (view full) ---

5788 fprintf (outfile, "%u", AT_flag (a));
5789 break;
5790 case dw_val_class_die_ref:
5791 if (AT_ref (a) != NULL)
5792 {
5793 if (AT_ref (a)->die_symbol)
5794 fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol);
5795 else
5796 fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset);
5796 fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset);
5797 }
5798 else
5799 fprintf (outfile, "die -> <null>");
5800 break;
5801 case dw_val_class_lbl_id:
5802 case dw_val_class_lineptr:
5803 case dw_val_class_macptr:
5804 fprintf (outfile, "label: %s", AT_lbl (a));

--- 1253 unchanged lines hidden (view full) ---

7058 unsigned ix;
7059
7060 /* If someone in another CU might refer to us, set up a symbol for
7061 them to point to. */
7062 if (die->die_symbol)
7063 output_die_symbol (die);
7064
7065 dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)",
5797 }
5798 else
5799 fprintf (outfile, "die -> <null>");
5800 break;
5801 case dw_val_class_lbl_id:
5802 case dw_val_class_lineptr:
5803 case dw_val_class_macptr:
5804 fprintf (outfile, "label: %s", AT_lbl (a));

--- 1253 unchanged lines hidden (view full) ---

7058 unsigned ix;
7059
7060 /* If someone in another CU might refer to us, set up a symbol for
7061 them to point to. */
7062 if (die->die_symbol)
7063 output_die_symbol (die);
7064
7065 dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)",
7066 die->die_offset, dwarf_tag_name (die->die_tag));
7066 (unsigned long)die->die_offset,
7067 dwarf_tag_name (die->die_tag));
7067
7068 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
7069 {
7070 const char *name = dwarf_attr_name (a->dw_attr);
7071
7072 switch (AT_class (a))
7073 {
7074 case dw_val_class_addr:

--- 165 unchanged lines hidden (view full) ---

7240 }
7241 }
7242
7243 FOR_EACH_CHILD (die, c, output_die (c));
7244
7245 /* Add null byte to terminate sibling list. */
7246 if (die->die_child != NULL)
7247 dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx",
7068
7069 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
7070 {
7071 const char *name = dwarf_attr_name (a->dw_attr);
7072
7073 switch (AT_class (a))
7074 {
7075 case dw_val_class_addr:

--- 165 unchanged lines hidden (view full) ---

7241 }
7242 }
7243
7244 FOR_EACH_CHILD (die, c, output_die (c));
7245
7246 /* Add null byte to terminate sibling list. */
7247 if (die->die_child != NULL)
7248 dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx",
7248 die->die_offset);
7249 (unsigned long) die->die_offset);
7249}
7250
7251/* Output the compilation unit that appears at the beginning of the
7252 .debug_info section, and precedes the DIE descriptions. */
7253
7254static void
7255output_compilation_unit_header (void)
7256{

--- 7236 unchanged lines hidden ---
7250}
7251
7252/* Output the compilation unit that appears at the beginning of the
7253 .debug_info section, and precedes the DIE descriptions. */
7254
7255static void
7256output_compilation_unit_header (void)
7257{

--- 7236 unchanged lines hidden ---