From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id 86A283851422 for ; Wed, 18 May 2022 18:01:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 86A283851422 Received: by mail-io1-xd32.google.com with SMTP id e194so3117116iof.11 for ; Wed, 18 May 2022 11:01:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7EuwpCL/0r09kUN3ubFwRMzYuevcxPieaQBLGKickjs=; b=If0gs6vVTDw6oTGPRR2Kva5Fax9cVKfNHYsCxv0s799qlziDeDRD6+Q6OESE15mH7y cPA6zKe3Ugx2ceCP3kslCZxFJg5x57ozibeq/Kdr2vd5HcmlWBPMTrwxS0JnO/yYvBMn Abjx8nBqtA0KNCfISG+Y2KotIu7235BbV3mpfK1lTYvv6M6lqnDaWxLMhjrKQ1+hqykv RKgsT0M+TuEjk2j4EZYDy2GnXn8eHEvuIENsMy0qe0gfenBN1PlD749ZnzeLFqBEDmg8 eGIFqW/boz847D2GF4C4PflrKO7kOE6JYB/nmxDf95mugWZo3Ndnh18FVG5jTF0WVh/d W4iQ== X-Gm-Message-State: AOAM5304RZ8Mj2DHLmglZTqLzErh+hfF6UppqkEPzU2wx8MzORmn/lHv Qe7ZI/8zuv5JHD792MKsCViY7lsWoMt7Fw== X-Google-Smtp-Source: ABdhPJw7bKmX4MUQwNwfy/133ESpfzELit4D/m/DHu0qd+M8ewBHnV0l5OZPYXTAcPj8sPm1W10Q3Q== X-Received: by 2002:a05:6638:d06:b0:32b:da48:4879 with SMTP id q6-20020a0566380d0600b0032bda484879mr409308jaj.117.1652896865903; Wed, 18 May 2022 11:01:05 -0700 (PDT) Received: from murgatroyd.Home (71-211-158-194.hlrn.qwest.net. [71.211.158.194]) by smtp.gmail.com with ESMTPSA id r4-20020a92d984000000b002cde6e352ffsm715083iln.73.2022.05.18.11.01.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 11:01:05 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 13/14] ODR warnings for "struct coff_symbol" Date: Wed, 18 May 2022 12:00:48 -0600 Message-Id: <20220518180049.2337257-14-tromey@adacore.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220518180049.2337257-1-tromey@adacore.com> References: <20220518180049.2337257-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-List-Received-Date: Wed, 18 May 2022 18:01:08 -0000 "struct coff_symbol" is defined in multiple .c files, causing ODR warnings. This patch renames just the xcoffread.c type. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395 --- gdb/xcoffread.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 250bd9f4a94..e520d7ad40b 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -86,7 +86,7 @@ static enum language psymtab_language = language_unknown; /* Simplified internal version of coff symbol table information. */ -struct coff_symbol +struct xcoff_symbol { char *c_name; int c_symnum; /* Symbol number of this entry. */ @@ -99,7 +99,7 @@ struct coff_symbol /* Last function's saved coff symbol `cs'. */ -static struct coff_symbol fcn_cs_saved; +static struct xcoff_symbol fcn_cs_saved; static bfd *symfile_bfd; @@ -208,7 +208,7 @@ static void scan_xcoff_symtab (minimal_symbol_reader &, static const char *xcoff_next_symbol_text (struct objfile *); -static void record_include_begin (struct coff_symbol *); +static void record_include_begin (struct xcoff_symbol *); static void enter_line_range (struct subfile *, unsigned, unsigned, @@ -230,7 +230,7 @@ static int read_symbol_lineno (int); static CORE_ADDR read_symbol_nvalue (int); -static struct symbol *process_xcoff_symbol (struct coff_symbol *, +static struct symbol *process_xcoff_symbol (struct xcoff_symbol *, struct objfile *); static void read_xcoff_symtab (struct objfile *, legacy_psymtab *); @@ -239,7 +239,7 @@ static void read_xcoff_symtab (struct objfile *, legacy_psymtab *); static void add_stab_to_list (char *, struct pending_stabs **); #endif -static void record_include_end (struct coff_symbol *); +static void record_include_end (struct xcoff_symbol *); static void process_linenos (CORE_ADDR, CORE_ADDR); @@ -512,7 +512,7 @@ static int inclDepth; /* nested include depth */ static void allocate_include_entry (void); static void -record_include_begin (struct coff_symbol *cs) +record_include_begin (struct xcoff_symbol *cs) { if (inclDepth) { @@ -533,7 +533,7 @@ record_include_begin (struct coff_symbol *cs) } static void -record_include_end (struct coff_symbol *cs) +record_include_end (struct xcoff_symbol *cs) { InclTable *pTbl; @@ -931,7 +931,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psymtab *pst) struct internal_syment symbol[1]; union internal_auxent main_aux; - struct coff_symbol cs[1]; + struct xcoff_symbol cs[1]; CORE_ADDR file_start_addr = 0; CORE_ADDR file_end_addr = 0; @@ -942,7 +942,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psymtab *pst) CORE_ADDR fcn_start_addr = 0; enum language pst_symtab_language; - struct coff_symbol fcn_stab_saved = { 0 }; + struct xcoff_symbol fcn_stab_saved = { 0 }; /* fcn_cs_saved is global because process_xcoff_symbol needs it. */ union internal_auxent fcn_aux_saved = main_aux; @@ -1457,7 +1457,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psymtab *pst) /* process one xcoff symbol. */ static struct symbol * -process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile) +process_xcoff_symbol (struct xcoff_symbol *cs, struct objfile *objfile) { struct symbol onesymbol; struct symbol *sym = &onesymbol; -- 2.34.1