From patchwork Wed May 23 04:58:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27430 Received: (qmail 114092 invoked by alias); 23 May 2018 04:59:14 -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 113401 invoked by uid 89); 23 May 2018 04:59:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.185.36) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 May 2018 04:59:04 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway36.websitewelcome.com (Postfix) with ESMTP id ED57A400DE806 for ; Tue, 22 May 2018 23:59:01 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id LLrZfGDJmbXuJLLrZfXsUd; Tue, 22 May 2018 23:59:01 -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 1fLLrZ-003S5D-O2; Tue, 22 May 2018 23:59:01 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 11/42] Move processing_gcc to stabsread Date: Tue, 22 May 2018 22:58:20 -0600 Message-Id: <20180523045851.11660-12-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: 1fLLrZ-003S5D-O2 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: 12 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes processing_gcc is also only used by stabsread -- it is set by the DWARF reader, but this turns out not to be needed. So, this patch moves processing_gcc and removes the assignment from the DWARF reader. gdb/ChangeLog 2018-05-22 Tom Tromey * stabsread.h (processing_gcc_compilation): Move from buildsym.h. * dwarf2read.c (dwarf2_start_symtab): Don't set processing_gcc_compilation. * buildsym.h (processing_gcc_compilation): Move to stabsread.h. --- gdb/ChangeLog | 7 +++++++ gdb/buildsym.h | 5 ----- gdb/dwarf2read.c | 3 --- gdb/stabsread.h | 5 +++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 0b19c39305..01d9acc2c9 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -66,11 +66,6 @@ struct subfile EXTERN struct subfile *current_subfile; -/* Global variable which, when set, indicates that we are processing a - .o file compiled with gcc */ - -EXTERN unsigned char processing_gcc_compilation; - /* Record the symbols defined for each context in a list. We don't create a struct block for the context until we know how long to make it. */ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 49ce83ff20..4871787583 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -21144,9 +21144,6 @@ dwarf2_start_symtab (struct dwarf2_cu *cu, record_debugformat ("DWARF 2"); record_producer (cu->producer); - /* We assume that we're processing GCC output. */ - processing_gcc_compilation = 2; - cu->processing_has_namespace_info = 0; return cust; diff --git a/gdb/stabsread.h b/gdb/stabsread.h index 7958990112..fdb404a25d 100644 --- a/gdb/stabsread.h +++ b/gdb/stabsread.h @@ -46,6 +46,11 @@ EXTERN unsigned int symnum; EXTERN const char *(*next_symbol_text_func) (struct objfile *); +/* Global variable which, when set, indicates that we are processing a + .o file compiled with gcc */ + +EXTERN unsigned char processing_gcc_compilation; + /* Hash table of global symbols whose values are not known yet. They are chained thru the SYMBOL_VALUE_CHAIN, since we don't have the correct data for that slot yet.