From patchwork Wed May 23 04:58:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27444 Received: (qmail 100910 invoked by alias); 23 May 2018 06:16:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 100271 invoked by uid 89); 23 May 2018 06:15:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:3890 X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 May 2018 06:15:25 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 3A0EE400D741D for ; Wed, 23 May 2018 01:15:10 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id LN3GfDP6c5CKDLN3GfgNgb; Wed, 23 May 2018 01:15:10 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:56108 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fLLrk-003S5D-N0; Tue, 22 May 2018 23:59:12 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 41/42] Remove some unused buildsym functions Date: Tue, 22 May 2018 22:58:50 -0600 Message-Id: <20180523045851.11660-42-tom@tromey.com> In-Reply-To: <20180523045851.11660-1-tom@tromey.com> References: <20180523045851.11660-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fLLrk-003S5D-N0 X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya.Home) [174.29.44.154]:56108 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Now that the DWARF reader uses the builder-based API, we can remove a few "legacy" functions that were only ever called by it. gdb/ChangeLog 2018-05-22 Tom Tromey * legacy-buildsym.h (augment_type_symtab): Don't declare. (end_expandable_symtab): Likewise. (end_symtab_get_static_block): Likewise. (end_symtab_from_static_block): Likewise. * buildsym.c (augment_type_symtab): Remove. (end_expandable_symtab): Remove. (end_symtab_get_static_block): Remove. (end_symtab_from_static_block): Remove. --- gdb/ChangeLog | 11 +++++++++++ gdb/buildsym.c | 38 -------------------------------------- gdb/legacy-buildsym.h | 32 -------------------------------- 3 files changed, 11 insertions(+), 70 deletions(-) diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d9a0e02653..c4e14f0272 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -1548,26 +1548,6 @@ pop_subfile () return buildsym_compunit->pop_subfile (); } -struct block * -end_symtab_get_static_block (CORE_ADDR end_addr, int expandable, int required) -{ - gdb_assert (buildsym_compunit != nullptr); - return buildsym_compunit->end_symtab_get_static_block (end_addr, expandable, - required); -} - -struct compunit_symtab * -end_symtab_from_static_block (struct block *static_block, - int section, int expandable) -{ - gdb_assert (buildsym_compunit != nullptr); - struct compunit_symtab *result - = buildsym_compunit->end_symtab_from_static_block (static_block, - section, expandable); - free_buildsym_compunit (); - return result; -} - struct compunit_symtab * end_symtab (CORE_ADDR end_addr, int section) { @@ -1578,24 +1558,6 @@ end_symtab (CORE_ADDR end_addr, int section) return result; } -struct compunit_symtab * -end_expandable_symtab (CORE_ADDR end_addr, int section) -{ - gdb_assert (buildsym_compunit != nullptr); - struct compunit_symtab *result - = buildsym_compunit->end_expandable_symtab (end_addr, section); - free_buildsym_compunit (); - return result; -} - -void -augment_type_symtab () -{ - gdb_assert (buildsym_compunit != nullptr); - buildsym_compunit->augment_type_symtab (); - free_buildsym_compunit (); -} - struct context_stack * push_context (int desc, CORE_ADDR valu) { diff --git a/gdb/legacy-buildsym.h b/gdb/legacy-buildsym.h index 5d405ee881..55f9d14f7e 100644 --- a/gdb/legacy-buildsym.h +++ b/gdb/legacy-buildsym.h @@ -37,25 +37,6 @@ The compunit symtab pointer ("cust") is returned from both start_symtab and end_symtab to simplify the debug info readers. - There are minor variations on this, e.g., dwarf2read.c splits end_symtab - into two calls: end_symtab_get_static_block, end_symtab_from_static_block, - but all debug info readers follow this basic flow. - - Reading DWARF Type Units is another variation: - - scoped_free_pendings free_pending; - cust = start_symtab (...); - ... read debug info ... - cust = end_expandable_symtab (...); - - And then reading subsequent Type Units within the containing "Comp Unit" - will use a second flow: - - scoped_free_pendings free_pending; - cust = restart_symtab (...); - ... read debug info ... - cust = augment_type_symtab (...); - dbxread.c and xcoffread.c use another variation: scoped_free_pendings free_pending; @@ -92,21 +73,8 @@ extern void push_subfile (); extern const char *pop_subfile (); -extern struct block *end_symtab_get_static_block (CORE_ADDR end_addr, - int expandable, - int required); - -extern struct compunit_symtab * - end_symtab_from_static_block (struct block *static_block, - int section, int expandable); - extern struct compunit_symtab *end_symtab (CORE_ADDR end_addr, int section); -extern struct compunit_symtab *end_expandable_symtab (CORE_ADDR end_addr, - int section); - -extern void augment_type_symtab (void); - extern struct context_stack *push_context (int desc, CORE_ADDR valu); extern struct context_stack *pop_context (void);