public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/casm-state-v3)] dwarf2out: port partially Date: Tue, 14 Sep 2021 12:36:09 +0000 (GMT) [thread overview] Message-ID: <20210914123609.9E6423857800@sourceware.org> (raw) https://gcc.gnu.org/g:0f737e7414da8cf9cc544ab463192f1baa68bc9b commit 0f737e7414da8cf9cc544ab463192f1baa68bc9b Author: Martin Liska <mliska@suse.cz> 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; + \f /* 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<dwarf_file_hasher>::create_ggc (50);
reply other threads:[~2021-09-14 12:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210914123609.9E6423857800@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).