From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id D34593858C51 for ; Mon, 28 Mar 2022 22:17:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D34593858C51 X-ASG-Debug-ID: 1648505838-0c856e06ab9e4270001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id emKD9lPdroKHM0F2 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Mar 2022 18:17:18 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 688EB441B21; Mon, 28 Mar 2022 18:17:18 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/2] gdb: remove some unused buildsym-legacy functions Date: Mon, 28 Mar 2022 18:17:16 -0400 X-ASG-Orig-Subj: [PATCH 1/2] gdb: remove some unused buildsym-legacy functions Message-Id: <20220328221717.2896842-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1648505838 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 5998 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.96973 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Spam-Status: No, score=-3498.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2022 22:17:28 -0000 Pretty much self-explanatory. Change-Id: I5b658d017cd891ecdd1df61075eacb0f44316935 --- gdb/buildsym-legacy.c | 89 ------------------------------------------- gdb/buildsym-legacy.h | 36 ----------------- 2 files changed, 125 deletions(-) diff --git a/gdb/buildsym-legacy.c b/gdb/buildsym-legacy.c index 7659f53cbe0..cfafcc38640 100644 --- a/gdb/buildsym-legacy.c +++ b/gdb/buildsym-legacy.c @@ -79,33 +79,6 @@ get_last_source_start_addr () /* See buildsym.h. */ -struct using_direct ** -get_local_using_directives () -{ - gdb_assert (buildsym_compunit != nullptr); - return buildsym_compunit->get_local_using_directives (); -} - -/* See buildsym.h. */ - -void -set_local_using_directives (struct using_direct *new_local) -{ - gdb_assert (buildsym_compunit != nullptr); - buildsym_compunit->set_local_using_directives (new_local); -} - -/* See buildsym.h. */ - -struct using_direct ** -get_global_using_directives () -{ - gdb_assert (buildsym_compunit != nullptr); - return buildsym_compunit->get_global_using_directives (); -} - -/* See buildsym.h. */ - bool outermost_context_p () { @@ -115,15 +88,6 @@ outermost_context_p () /* See buildsym.h. */ -struct context_stack * -get_current_context_stack () -{ - gdb_assert (buildsym_compunit != nullptr); - return buildsym_compunit->get_current_context_stack (); -} - -/* See buildsym.h. */ - int get_context_stack_depth () { @@ -240,14 +204,6 @@ finish_block (struct symbol *symbol, struct pending_block *old_blocks, start, end); } -void -record_block_range (struct block *block, CORE_ADDR start, - CORE_ADDR end_inclusive) -{ - gdb_assert (buildsym_compunit != nullptr); - buildsym_compunit->record_block_range (block, start, end_inclusive); -} - void record_line (struct subfile *subfile, int line, CORE_ADDR pc) { @@ -283,51 +239,6 @@ start_symtab (struct objfile *objfile, const char *name, const char *comp_dir, return buildsym_compunit->get_compunit_symtab (); } -/* Restart compilation for a symtab. - CUST is the result of end_expandable_symtab. - NAME, START_ADDR are the source file we are resuming with. - - This is used when a symtab is built from multiple sources. - The symtab is first built with start_symtab/end_expandable_symtab - and then for each additional piece call restart_symtab/augment_*_symtab. - Note: At the moment there is only augment_type_symtab. */ - -void -restart_symtab (struct compunit_symtab *cust, - const char *name, CORE_ADDR start_addr) -{ - /* These should have been reset either by successful completion of building - a symtab, or by the scoped_free_pendings destructor. */ - gdb_assert (buildsym_compunit == nullptr); - - buildsym_compunit - = new struct buildsym_compunit (cust->objfile (), - name, - cust->dirname (), - compunit_language (cust), - start_addr, - cust); -} - -/* See buildsym.h. */ - -struct compunit_symtab * -buildsym_compunit_symtab (void) -{ - gdb_assert (buildsym_compunit != NULL); - - return buildsym_compunit->get_compunit_symtab (); -} - -/* See buildsym.h. */ - -struct macro_table * -get_macro_table (void) -{ - gdb_assert (buildsym_compunit != NULL); - return buildsym_compunit->get_macro_table (); -} - /* At end of reading syms, or in case of quit, ensure everything associated with building symtabs is freed. diff --git a/gdb/buildsym-legacy.h b/gdb/buildsym-legacy.h index 9393aff4cee..b8b5caf0763 100644 --- a/gdb/buildsym-legacy.h +++ b/gdb/buildsym-legacy.h @@ -62,9 +62,6 @@ extern struct block *finish_block (struct symbol *symbol, CORE_ADDR start, CORE_ADDR end); -extern void record_block_range (struct block *, - CORE_ADDR start, CORE_ADDR end_inclusive); - extern void start_subfile (const char *name); extern void patch_subfile_names (struct subfile *subfile, const char *name); @@ -87,9 +84,6 @@ extern struct compunit_symtab *start_symtab (struct objfile *objfile, CORE_ADDR start_addr, enum language language); -extern void restart_symtab (struct compunit_symtab *cust, - const char *name, CORE_ADDR start_addr); - /* Record the name of the debug format in the current pending symbol table. FORMAT must be a string with a lifetime at least as long as the symtab's objfile. */ @@ -111,19 +105,6 @@ extern void set_last_source_file (const char *name); extern const char *get_last_source_file (void); -/* Return the compunit symtab object. - It is only valid to call this between calls to start_symtab and the - end_symtab* functions. */ - -extern struct compunit_symtab *buildsym_compunit_symtab (void); - -/* Return the macro table. - Initialize it if this is the first use. - It is only valid to call this between calls to start_symtab and the - end_symtab* functions. */ - -extern struct macro_table *get_macro_table (void); - /* Set the last source start address. Can only be used between start_symtab and end_symtab* calls. */ @@ -134,27 +115,10 @@ extern void set_last_source_start_addr (CORE_ADDR addr); extern CORE_ADDR get_last_source_start_addr (); -/* Return the local using directives. */ - -extern struct using_direct **get_local_using_directives (); - -/* Set the list of local using directives. */ - -extern void set_local_using_directives (struct using_direct *new_local); - -/* Return the global using directives. */ - -extern struct using_direct **get_global_using_directives (); - /* True if the context stack is empty. */ extern bool outermost_context_p (); -/* Return the top of the context stack, or nullptr if there is an - entry. */ - -extern struct context_stack *get_current_context_stack (); - /* Return the context stack depth. */ extern int get_context_stack_depth (); -- 2.35.1