From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 13/14] ODR warnings for "struct coff_symbol"
Date: Wed, 18 May 2022 12:00:48 -0600 [thread overview]
Message-ID: <20220518180049.2337257-14-tromey@adacore.com> (raw)
In-Reply-To: <20220518180049.2337257-1-tromey@adacore.com>
"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);
\f
@@ -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
next prev parent reply other threads:[~2022-05-18 18:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 18:00 [PATCH 00/14] More ODR fixes Tom Tromey
2022-05-18 18:00 ` [PATCH 01/14] Fix ODR warning in observable.h Tom Tromey
2022-05-18 18:00 ` [PATCH 02/14] ODR warnings for struct symloc Tom Tromey
2022-05-18 18:00 ` [PATCH 03/14] ODR warnings for struct nextfield Tom Tromey
2022-05-18 18:00 ` [PATCH 04/14] ODR warning for struct field_info Tom Tromey
2022-05-18 18:00 ` [PATCH 05/14] ODR warning for struct ext_link_map Tom Tromey
2022-05-18 18:00 ` [PATCH 06/14] ODR warning for "struct instruction_type" Tom Tromey
2022-05-18 18:00 ` [PATCH 07/14] ODR warning for "struct stack_item" Tom Tromey
2022-05-18 18:00 ` [PATCH 08/14] ODR warning for "struct find_targ_sec_arg" Tom Tromey
2022-05-18 18:00 ` [PATCH 09/14] ODR warning for "enum string_repr_result" Tom Tromey
2022-05-18 18:00 ` [PATCH 10/14] ODR warnings from overlay constants Tom Tromey
2022-05-18 18:00 ` [PATCH 11/14] ODR warnings for "struct insn_info" Tom Tromey
2022-05-18 18:00 ` [PATCH 12/14] ODR warnings for "struct insn_decode_record_t" Tom Tromey
2022-05-18 18:00 ` Tom Tromey [this message]
2022-05-18 18:00 ` [PATCH 14/14] ODR warning for "main" Tom Tromey
2022-06-02 15:28 ` [PATCH 00/14] More ODR fixes Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220518180049.2337257-14-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).