From patchwork Wed Aug 6 06:50:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2312 Received: (qmail 30874 invoked by alias); 6 Aug 2014 06:54:35 -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 30857 invoked by uid 89); 6 Aug 2014 06:54:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Aug 2014 06:54:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XEv7F-00039P-St from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 05 Aug 2014 23:54:29 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Aug 2014 23:54:29 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Tue, 5 Aug 2014 23:53:23 -0700 From: Yao Qi To: Subject: [PATCH 1/2] Remove pst from dwarf_decode_lines_1 Date: Wed, 6 Aug 2014 14:50:12 +0800 Message-ID: <1407307813-5321-1-git-send-email-yao@codesourcery.com> In-Reply-To: <53D8A264.1050103@codesourcery.com> References: <53D8A264.1050103@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi, Parameter 'pst' of function dwarf_decode_lines_1 isn't used except to compute decode_for_pst_p, which has been got in the caller dwarf_decode_lines. I wonder it would be good if we just pass 'decode_for_pst_p'. gdb: 2014-08-06 Yao Qi * dwarf2read.c (dwarf_decode_lines_1): Remove parameter 'pst'. Add parameter 'decode_for_pst_p'. Callers update. --- gdb/dwarf2read.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 8f5d9d4..8011e4e 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17179,7 +17179,7 @@ noop_record_line (struct subfile *subfile, int line, CORE_ADDR pc) static void dwarf_decode_lines_1 (struct line_header *lh, const char *comp_dir, - struct dwarf2_cu *cu, struct partial_symtab *pst) + struct dwarf2_cu *cu, const int decode_for_pst_p) { const gdb_byte *line_ptr, *extended_end; const gdb_byte *line_end; @@ -17189,7 +17189,6 @@ dwarf_decode_lines_1 (struct line_header *lh, const char *comp_dir, struct objfile *objfile = cu->objfile; bfd *abfd = objfile->obfd; struct gdbarch *gdbarch = get_objfile_arch (objfile); - const int decode_for_pst_p = (pst != NULL); struct subfile *last_subfile = NULL; void (*p_record_line) (struct subfile *subfile, int line, CORE_ADDR pc) = record_line; @@ -17507,7 +17506,7 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, struct subfile *first_subfile = current_subfile; if (want_line_info) - dwarf_decode_lines_1 (lh, comp_dir, cu, pst); + dwarf_decode_lines_1 (lh, comp_dir, cu, decode_for_pst_p); if (decode_for_pst_p) {