From patchwork Fri Jul 20 04:27:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28507 Received: (qmail 13426 invoked by alias); 20 Jul 2018 04:28:08 -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 13231 invoked by uid 89); 20 Jul 2018 04:28:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 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=coffread.c, coffreadc, UD:coffread.c, sk:read_xc X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jul 2018 04:28:04 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 9E2DF16BC7 for ; Thu, 19 Jul 2018 23:28:01 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id gN1DfPxPRbXuJgN1JfXPqi; Thu, 19 Jul 2018 23:28:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3/4PQxLI1xj54rtErZEL8KjIgmOKxW+WTMFZm4k6GOY=; b=Zhlvdp2KsN3+AXRIdN2QTS7ux8 TMA/ci/ZhwmF6T0ySyJK1dQpiBykqf0ir4QCGojWm0U7sL6lw0t5Iri2tKrLNq8jhOpyp0Q3Aqt98 qvGrjvqq9S91SQjNzDq1EouqU; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:39336 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fgN1D-003pgz-AN; Thu, 19 Jul 2018 23:27:51 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA v2 05/23] Remove the "listhead" argument from finish_block Date: Thu, 19 Jul 2018 22:27:29 -0600 Message-Id: <20180720042747.18473-6-tom@tromey.com> In-Reply-To: <20180720042747.18473-1-tom@tromey.com> References: <20180720042747.18473-1-tom@tromey.com> finish_block is only ever called with "&local_symbols" as the "listhead" argument. So, remove this argument. gdb/ChangeLog 2018-07-19 Tom Tromey * xcoffread.c (read_xcoff_symtab): Update. * dwarf2read.c (read_func_scope, read_lexical_block_scope): Update. * dbxread.c (process_one_symbol): Update. * coffread.c (coff_symtab_read): Update. * buildsym.h (finish_block): Update. * buildsym.c (finish_block): Remove "listhead" argument. (end_symtab_get_static_block): Update. --- gdb/ChangeLog | 11 +++++++++++ gdb/buildsym.c | 5 ++--- gdb/buildsym.h | 1 - gdb/coffread.c | 4 ++-- gdb/dbxread.c | 6 +++--- gdb/dwarf2read.c | 4 ++-- gdb/xcoffread.c | 4 ++-- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d6c5393958a..4c151211044 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -576,12 +576,11 @@ finish_block_internal (struct symbol *symbol, struct block * finish_block (struct symbol *symbol, - struct pending **listhead, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, CORE_ADDR end) { - return finish_block_internal (symbol, listhead, old_blocks, static_link, + return finish_block_internal (symbol, &local_symbols, old_blocks, static_link, start, end, 0, 0); } @@ -1196,7 +1195,7 @@ end_symtab_get_static_block (CORE_ADDR end_addr, int expandable, int required) struct context_stack cstk = pop_context (); /* Make a block for the local symbols within. */ - finish_block (cstk.name, &local_symbols, cstk.old_blocks, NULL, + finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, end_addr); if (!buildsym_compunit->m_context_stack.empty ()) diff --git a/gdb/buildsym.h b/gdb/buildsym.h index e0668f8678d..10dce3edba8 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -144,7 +144,6 @@ extern struct symbol *find_symbol_in_list (struct pending *list, char *name, int length); extern struct block *finish_block (struct symbol *symbol, - struct pending **listhead, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, diff --git a/gdb/coffread.c b/gdb/coffread.c index 758cd49b394..2d7859bd5d1 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1135,7 +1135,7 @@ coff_symtab_read (minimal_symbol_reader &reader, enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line, objfile); - finish_block (cstk.name, &local_symbols, cstk.old_blocks, + finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, fcn_cs_saved.c_value + fcn_aux_saved.x_sym.x_misc.x_fsize @@ -1177,7 +1177,7 @@ coff_symtab_read (minimal_symbol_reader &reader, cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); /* Make a block for the local symbols within. */ - finish_block (0, &local_symbols, cstk.old_blocks, NULL, + finish_block (0, cstk.old_blocks, NULL, cstk.start_addr, tmpaddr); } /* Now pop locals of block just finished. */ diff --git a/gdb/dbxread.c b/gdb/dbxread.c index b5cec28ae48..e79d2a858af 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2516,7 +2516,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name, cstk = pop_context (); /* Make a block for the local symbols within. */ - block = finish_block (cstk.name, &local_symbols, + block = finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, cstk.start_addr + valu); @@ -2603,7 +2603,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name, cstk.start_addr = valu; } /* Make a block for the local symbols within. */ - finish_block (0, &local_symbols, cstk.old_blocks, NULL, + finish_block (0, cstk.old_blocks, NULL, cstk.start_addr, valu); } } @@ -2890,7 +2890,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name, cstk = pop_context (); /* Make a block for the local symbols within. */ - block = finish_block (cstk.name, &local_symbols, + block = finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, valu); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 62c87e635e6..e6a8a188b19 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -13685,7 +13685,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) struct context_stack cstk = pop_context (); /* Make a block for the local symbols within. */ - block = finish_block (cstk.name, &local_symbols, cstk.old_blocks, + block = finish_block (cstk.name, cstk.old_blocks, cstk.static_link, lowpc, highpc); /* For C++, set the block's scope. */ @@ -13781,7 +13781,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) if (local_symbols != NULL || (*get_local_using_directives ()) != NULL) { struct block *block - = finish_block (0, &local_symbols, cstk.old_blocks, NULL, + = finish_block (0, cstk.old_blocks, NULL, cstk.start_addr, highpc); /* Note that recording ranges after traversing children, as we diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 98efa969c38..f8dd3e9e0a2 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1408,7 +1408,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) break; } - finish_block (cstk.name, &local_symbols, cstk.old_blocks, + finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, (fcn_cs_saved.c_value + fcn_aux_saved.x_sym.x_misc.x_fsize @@ -1499,7 +1499,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) if (local_symbols && !outermost_context_p ()) { /* Make a block for the local symbols within. */ - finish_block (cstk.name, &local_symbols, + finish_block (cstk.name, cstk.old_blocks, NULL, cstk.start_addr, (cs->c_value