This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Dwarf Patch] Create .debug_str section in .o with -gsplit-dwarf (issue8540048)
- From: Cary Coutant <ccoutant at google dot com>
- To: Sterling Augustine <saugustine at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, reply at codereview dot appspotmail dot com
- Date: Tue, 23 Apr 2013 14:45:22 -0700
- Subject: Re: [Dwarf Patch] Create .debug_str section in .o with -gsplit-dwarf (issue8540048)
- References: <20130423210130 dot CDD99A0876 at sterling dot mtv dot corp dot google dot com>
> 2013-04-22 Sterling Augustine <saugustine@google.com>
>
> * dwarf2out.c (skeleton_debug_str_hash, comp_dir_string,
> add_skeleton_AT_string. comp_dir_string, debug_str_dwo_section): New.
s/./,/
I think comp_dir_string only needs to be mentioned once.
> (DEBUG_STR_DWO_SECTION): Rename to ...
> (DEBUG_DWO_STR_SECTION): ... this.
> (DEBUG_NORM_STR_SECTION): Delete.
> (DEBUG_STR_SECTION, DEBUG_STR_SECTION_FLAGS): Edit definitions.
> (DEBUG_STR_DWO_SECTION_FLAGS): New.
> (find_AT_string): Move most logic to ...
> (find_AT_string_in_table): ... here. New.
> (add_top_level_skeleton_die_attrs): Call comp_dir_string and
> add_skeleton_AT_string. Delete logic.
> (output_skeleton_debug_sections): Remove call to
> add_top_level_skeleton_die_attrs.
> (add_comp_dir_attribute): Move logic to comp_dir_string.
> (dwarf2out_init): Initialize debug_str_dwo_section.
> (output_indirect_string): Call find_string_form.
> (output_indirect_strings): Rewrite.
> (prune_unused_types): Empty skeleton_debug_str_hash.
> Call get_skeleton_type_unit and add_top_level_skeleton_die_attrs.
> (dwarf2out_finish): Call output_indirect_strings.
You'll be calling comp_dir_string twice, so I think you should cache
its return value.
-cary