Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 5489074: [Google Debugfission] Add pubnames and pubtypes to google/main

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by saugustine
Modified:
13 years, 4 months ago
Reviewers:
Cary
CC:
gcc-patches_gcc.gnu.org
Visibility:
Public.

Description

Enclosed for review and inclusion on the google/main and google/4_6 trees is the first patch for the debugfission project. It includes producing a complete and correct set of .debug_pubnames and .debug_pubtypes, as well as switching the default to generate .debug_pubnames and .debug_pubtypes. It further (and the most worth of review), changes certain decl printers (which are used to generate debug info) to be more consistent with the naming conventions used by demanglers. Tested: Via complete bootstap and running the test suite. No new failures found. ChangeLog: 2011-12-17 Sterling Augustine <saugustine@google.com> * gcc/dwarf2out.c (is_cu_die, is_namespace_die, is_class_die): New functions. (add_pubname): Call is_namespace_die, is_cu_die, and is_class_die in conditional. (add_enumerator_pubname): New function. (add_pubtype): Call is_namespace_die. Rework name calculation. Call type_tag, lang_hooks.dwarf_name and add_enumerator_pubname. (output_pubnames): Output debug_pubnames_section_label or debug_pubtypes_section_label. (base_type_die): Call add_pubtype. (gen_namespace_die): Call add_pubname_string and lang_hooks.dwarf_name. (dwarf2out_init): Generate debug_pubnames_section_label and debug_pubtypes_section_label. (dwarf2out_finish): Call add_AT_lineptr if pubnames or pubtypes is non-empty. When dealing with pubnames, change assertion to conditional. Call pubtypes_section_empty. Likewise when dealing with pubtypes. Move code checking for empty section to... (pubtypes_section_empty): ...here. New function. * gcc/target.def: Switch default generate pubnames and types to true. cp-family/ChangeLog: 2011-12-17 Sterling Augustine <saugustine@google.com> * gcc/c-family/c-pretty-print.c (pp_c_specifier_qualifier_list): Move conditional from beginning to end. cp/ChangeLog 2011-12-17 Sterling Augustine <saugustine@google.com> * gcc/cp/error.c (dump_decl): Reformat return value to "(anonymous namespace)". (lang_decl_name): Return "(anonymous namespace)" when appropriate. include/ChangeLog * include/dwarf2.h (enum dwarf_form): Add forms DW_FORM_GNU_ref_index, DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index. (enum dwarf_attribute): Add attributes: Add DW_AT_GNU_dwo_name, DW_AT_GNU_dwo_id, DW_AT_GNU_ref_base, DW_AT_GNU_addr_base, DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -53 lines) Patch
M gcc/c-family/c-pretty-print.c View 2 chunks +2 lines, -2 lines 0 comments Download
M gcc/cp/error.c View 2 chunks +3 lines, -1 line 0 comments Download
M gcc/dwarf2out.c View 14 chunks +138 lines, -48 lines 0 comments Download
M gcc/target.def View 1 chunk +1 line, -1 line 0 comments Download
M include/dwarf2.h View 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 2
saugustine
Enclosed for review and inclusion on the google/main and google/4_6 trees is the first patch ...
13 years, 4 months ago (2011-12-17 19:26:52 UTC) #1
Cary
13 years, 4 months ago (2011-12-18 06:46:46 UTC) #2
> 2011-12-17   Sterling Augustine  <saugustine@google.com>
>
>        * gcc/dwarf2out.c (is_cu_die, is_namespace_die, is_class_die): New
>        functions.
>        (add_pubname): Call is_namespace_die, is_cu_die, and is_class_die in
>        conditional.
>        (add_enumerator_pubname): New function.
>        (add_pubtype): Call is_namespace_die. Rework name calculation.  Call
>        type_tag, lang_hooks.dwarf_name and add_enumerator_pubname.
>        (output_pubnames): Output debug_pubnames_section_label or
>        debug_pubtypes_section_label.
>        (base_type_die): Call add_pubtype.
>        (gen_namespace_die): Call add_pubname_string and lang_hooks.dwarf_name.
>        (dwarf2out_init): Generate debug_pubnames_section_label and
>        debug_pubtypes_section_label.
>        (dwarf2out_finish): Call add_AT_lineptr if pubnames or pubtypes is
>        non-empty.  When dealing with pubnames, change assertion to
conditional.
>        Call pubtypes_section_empty.  Likewise when dealing with pubtypes.
>        Move code checking for empty section to...
>        (pubtypes_section_empty): ...here. New function.
>        * gcc/target.def: Switch default generate pubnames and types to true.
>
> cp-family/ChangeLog:
> 2011-12-17   Sterling Augustine  <saugustine@google.com>
>
>        * gcc/c-family/c-pretty-print.c (pp_c_specifier_qualifier_list): Move
>        conditional from beginning to end.
>
> cp/ChangeLog
> 2011-12-17   Sterling Augustine  <saugustine@google.com>
>
>        * gcc/cp/error.c (dump_decl): Reformat return value to
>        "(anonymous namespace)".
>        (lang_decl_name): Return "(anonymous namespace)" when appropriate.
>
> include/ChangeLog
>        * include/dwarf2.h (enum dwarf_form): Add forms DW_FORM_GNU_ref_index,
>        DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index.
>        (enum dwarf_attribute): Add attributes: Add DW_AT_GNU_dwo_name,
>        DW_AT_GNU_dwo_id, DW_AT_GNU_ref_base, DW_AT_GNU_addr_base,
>        DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes.

This is OK for google/main and google/gcc-4_6.

-cary
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b