From patchwork Tue Aug 1 16:20:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 73435 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8E473858039 for ; Tue, 1 Aug 2023 16:21:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8E473858039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690906881; bh=SybcjSxeR/0WZj8mzP8bHZW17DzlDK9/40MreBDHsA4=; h=Date:Subject:References:In-Reply-To:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sGbqTNe+qXRLWKD1jBow1ILXv1yYRq2ZYy9DDogngoJTFdP9Olk1xvM/WhUVl+Bzh +W7HEBD/CIgliX/bF8UMKj5TyWkmTMnWDBAWLRjYa9B9mHBTVTHpiDUhi8uWOiKX4U uezzjSCYecJlI1pw9t1sbqb2iw4LJOot/iR8gPlQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 3A47B3858C53 for ; Tue, 1 Aug 2023 16:20:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A47B3858C53 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-3490a1f8ae0so18226365ab.2 for ; Tue, 01 Aug 2023 09:20:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690906855; x=1691511655; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SybcjSxeR/0WZj8mzP8bHZW17DzlDK9/40MreBDHsA4=; b=F/rZJFS15lT9lBUnQmD8VKtooPcBRRmgE2PWd3mOveapof/k/SndRlqS7L3BNQdR/T Q5Z+XUcOAxxJF7APqRyyvRg/wZUw5ei1vGVWBXh3ITINiC7aHVPhDYC8gHdnOiDDdQhG igES3GdO07U3ZDAxxGecHtrlzIclpUncrMcCmfh1N94D5WjotMgMYMi7dd98eVwYO49N 3qkeS/JoFnpvfC4nhSNOfDgilxr95iYmzwkxtps4e5H7a6XcpwC8NBvYbki5Mkx9fOLK Zd70orHk2gUIrYM0q5+Xo4Ahw2ZRJI7JfPZ1NNHderUt75Zle5NnrPotS14Hu5KuAPCd JHJw== X-Gm-Message-State: ABy/qLYZWLpvpIPC2xWLAWnkCf0ZMQjWeGB6C+gmF01gmOouZf3bwE2I CYL0A43RsCSCInVewQkgmIUk4F7bUbxyOFXTb/oa6Q== X-Google-Smtp-Source: APBJJlFi48OANMHeIn0DTiRnDtPEYanB3WKnW939DTgcyoB+NNi8H8Pji9L65mJC7pedOFLrqLdyXw== X-Received: by 2002:a05:6e02:1569:b0:348:c041:abd7 with SMTP id k9-20020a056e02156900b00348c041abd7mr9517472ilu.13.1690906855341; Tue, 01 Aug 2023 09:20:55 -0700 (PDT) Received: from localhost.localdomain (75-166-135-140.hlrn.qwest.net. [75.166.135.140]) by smtp.gmail.com with ESMTPSA id u20-20020a02c054000000b0042b05586c52sm3833949jam.25.2023.08.01.09.20.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 09:20:55 -0700 (PDT) Date: Tue, 01 Aug 2023 10:20:52 -0600 Subject: [PATCH 1/2] Remove most includes of psymtab.h MIME-Version: 1.0 Message-Id: <20230801-psym-incl-fixup-v1-1-53284d513561@adacore.com> References: <20230801-psym-incl-fixup-v1-0-53284d513561@adacore.com> In-Reply-To: <20230801-psym-incl-fixup-v1-0-53284d513561@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I found that most spots including psymtab.h do not need it. This patch removes these includes, and also one unnecessary include of psympriv.h. --- gdb/coffread.c | 1 - gdb/elfread.c | 1 - gdb/mi/mi-cmd-file.c | 1 - gdb/mipsread.c | 2 -- gdb/objfiles.c | 1 - gdb/objfiles.h | 1 - gdb/rust-lang.c | 1 - gdb/stabsread.h | 2 ++ 8 files changed, 2 insertions(+), 8 deletions(-) diff --git a/gdb/coffread.c b/gdb/coffread.c index 6ec341c61c2..8dd11e02ed2 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -40,7 +40,6 @@ #include "coff-pe-read.h" -#include "psymtab.h" #include "build-id.h" /* The objfile we are currently reading. */ diff --git a/gdb/elfread.c b/gdb/elfread.c index 349a8b75bcc..862beb9e6c0 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -30,7 +30,6 @@ #include "objfiles.h" #include "stabsread.h" #include "demangle.h" -#include "psympriv.h" #include "filenames.h" #include "probe.h" #include "arch-utils.h" diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index 0883cb6f978..688bf493f19 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -25,7 +25,6 @@ #include "symtab.h" #include "source.h" #include "objfiles.h" -#include "psymtab.h" #include "solib.h" #include "solist.h" #include "gdbsupport/gdb_regex.h" diff --git a/gdb/mipsread.c b/gdb/mipsread.c index efff2841974..447684154af 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -39,8 +39,6 @@ #include "elf/internal.h" #include "elf/mips.h" -#include "psymtab.h" - static void read_alphacoff_dynamic_symtab (minimal_symbol_reader &, struct objfile *objfile); diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 5ba5f0a616d..222fa89ca97 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -47,7 +47,6 @@ #include "exec.h" #include "observable.h" #include "complaints.h" -#include "psymtab.h" #include "solist.h" #include "gdb_bfd.h" #include "btrace.h" diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 189856f0a51..91dda1c9f4c 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -27,7 +27,6 @@ #include "progspace.h" #include "registry.h" #include "gdb_bfd.h" -#include "psymtab.h" #include #include #include diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index a060720fd76..5eb33d0d3b7 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -29,7 +29,6 @@ #include "gdbarch.h" #include "infcall.h" #include "objfiles.h" -#include "psymtab.h" #include "rust-lang.h" #include "typeprint.h" #include "valprint.h" diff --git a/gdb/stabsread.h b/gdb/stabsread.h index 27ba176f63f..18a0c59332e 100644 --- a/gdb/stabsread.h +++ b/gdb/stabsread.h @@ -168,6 +168,8 @@ extern void end_stabs (void); extern void finish_global_stabs (struct objfile *objfile); +class psymtab_storage; + /* Functions exported by dbxread.c. These are not in stabsread.c because they are only used by some stabs readers. */