From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 64F3B395A07B; Thu, 2 Jun 2022 15:29:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64F3B395A07B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ODR warnings for "struct coff_symbol" X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 4748a9be449fddcd69e865bdc484519c30701e55 X-Git-Newrev: a7f779c12e6f166e279ce2e189aa009dabaccae7 Message-Id: <20220602152954.64F3B395A07B@sourceware.org> Date: Thu, 2 Jun 2022 15:29:54 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 15:29:54 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da7f779c12e6f= 166e279ce2e189aa009dabaccae7 commit a7f779c12e6f166e279ce2e189aa009dabaccae7 Author: Tom Tromey Date: Wed May 18 10:12:41 2022 -0600 ODR warnings for "struct coff_symbol" =20 "struct coff_symbol" is defined in multiple .c files, causing ODR warnings. This patch renames just the xcoffread.c type. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D22395 Diff: --- 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 =3D language_unknow= n; =20 /* Simplified internal version of coff symbol table information. */ =20 -struct coff_symbol +struct xcoff_symbol { char *c_name; int c_symnum; /* Symbol number of this entry. */ @@ -99,7 +99,7 @@ struct coff_symbol =20 /* Last function's saved coff symbol `cs'. */ =20 -static struct coff_symbol fcn_cs_saved; +static struct xcoff_symbol fcn_cs_saved; =20 static bfd *symfile_bfd; =20 @@ -208,7 +208,7 @@ static void scan_xcoff_symtab (minimal_symbol_reader &, =20 static const char *xcoff_next_symbol_text (struct objfile *); =20 -static void record_include_begin (struct coff_symbol *); +static void record_include_begin (struct xcoff_symbol *); =20 static void enter_line_range (struct subfile *, unsigned, unsigned, @@ -230,7 +230,7 @@ static int read_symbol_lineno (int); =20 static CORE_ADDR read_symbol_nvalue (int); =20 -static struct symbol *process_xcoff_symbol (struct coff_symbol *, +static struct symbol *process_xcoff_symbol (struct xcoff_symbol *, struct objfile *); =20 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 =20 -static void record_include_end (struct coff_symbol *); +static void record_include_end (struct xcoff_symbol *); =20 static void process_linenos (CORE_ADDR, CORE_ADDR); =0C @@ -512,7 +512,7 @@ static int inclDepth; /* nested include depth */ static void allocate_include_entry (void); =20 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) } =20 static void -record_include_end (struct coff_symbol *cs) +record_include_end (struct xcoff_symbol *cs) { InclTable *pTbl; =20 @@ -931,7 +931,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psym= tab *pst) =20 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 =3D 0; CORE_ADDR file_end_addr =3D 0; =20 @@ -942,7 +942,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psym= tab *pst) CORE_ADDR fcn_start_addr =3D 0; enum language pst_symtab_language; =20 - struct coff_symbol fcn_stab_saved =3D { 0 }; + struct xcoff_symbol fcn_stab_saved =3D { 0 }; =20 /* fcn_cs_saved is global because process_xcoff_symbol needs it. */ union internal_auxent fcn_aux_saved =3D main_aux; @@ -1457,7 +1457,7 @@ read_xcoff_symtab (struct objfile *objfile, legacy_ps= ymtab *pst) /* process one xcoff symbol. */ =20 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 =3D &onesymbol;