From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 9E6423857800; Tue, 14 Sep 2021 12:36:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E6423857800 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/casm-state-v3)] dwarf2out: port partially X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/casm-state-v3 X-Git-Oldrev: 96c091ccb471d4faf61374b83046e4696de12a0e X-Git-Newrev: 0f737e7414da8cf9cc544ab463192f1baa68bc9b Message-Id: <20210914123609.9E6423857800@sourceware.org> Date: Tue, 14 Sep 2021 12:36:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 12:36:09 -0000 https://gcc.gnu.org/g:0f737e7414da8cf9cc544ab463192f1baa68bc9b commit 0f737e7414da8cf9cc544ab463192f1baa68bc9b Author: Martin Liska Date: Tue Sep 14 13:28:55 2021 +0200 dwarf2out: port partially Diff: --- gcc/dwarf2out.c | 53 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1d0b09bdaa5..d9c4bdde46a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4205,27 +4205,6 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel) #define SKELETON_COMP_DIE_ABBREV 1 #define SKELETON_TYPE_DIE_ABBREV 2 -/* Definitions of defaults for formats and names of various special - (artificial) labels which may be generated within this file (when the -g - options is used and DWARF2_DEBUGGING_INFO is in effect. - If necessary, these may be overridden from within the tm.h file, but - typically, overriding these defaults is unnecessary. */ - -static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char text_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char cold_text_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char cold_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_skeleton_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_skeleton_abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_addr_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char debug_skeleton_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char macinfo_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char loc_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; -static char ranges_section_label[2 * MAX_ARTIFICIAL_LABEL_BYTES]; -static char ranges_base_label[2 * MAX_ARTIFICIAL_LABEL_BYTES]; #ifndef TEXT_END_LABEL #define TEXT_END_LABEL "Letext" @@ -4246,6 +4225,36 @@ static char ranges_base_label[2 * MAX_ARTIFICIAL_LABEL_BYTES]; #define LINE_CODE_LABEL "LM" #endif +struct dwarf_out_state +{ + /* Definitions of defaults for formats and names of various special + (artificial) labels which may be generated within this file (when the -g + options is used and DWARF2_DEBUGGING_INFO is in effect. + If necessary, these may be overridden from within the tm.h file, but + typically, overriding these defaults is unnecessary. */ + + struct + { + char text_end[MAX_ARTIFICIAL_LABEL_BYTES]; + char text_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char cold_text_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char cold_end[MAX_ARTIFICIAL_LABEL_BYTES]; + char abbrev_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_info_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_skeleton_info_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_skeleton_abbrev_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_line_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_addr_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char debug_skeleton_line_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char macinfo_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char loc_section[MAX_ARTIFICIAL_LABEL_BYTES]; + char ranges_section[2 * MAX_ARTIFICIAL_LABEL_BYTES]; + char ranges_base[2 * MAX_ARTIFICIAL_LABEL_BYTES]; + } labels; +}; + +static dwarf_out_state *dwarf_state = NULL; + /* Return the root of the DIE's built for the current compilation unit. */ static dw_die_ref @@ -29318,6 +29327,8 @@ init_sections_and_labels (bool early_lto_debug) static void dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) { + dwarf_state = new dwarf_out_state (); + /* Allocate the file_table. */ file_table = hash_table::create_ggc (50);