From 77845a9ac6871b2480b1533b70831db320233885 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 10 May 2022 08:56:26 -0600 Subject: ODR warnings for struct symloc "struct symloc" is defined in multiple spots in gdb, causing ODR warnings. This patch renames these. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395 --- gdb/mdebugread.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index ca7c15e..a2280c3 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -86,7 +86,7 @@ static struct objfile *mdebugread_objfile; /* We put a pointer to this structure in the read_symtab_private field of the psymtab. */ -struct symloc +struct md_symloc { /* Index of the FDR that this psymtab represents. */ int fdr_idx; @@ -102,7 +102,7 @@ struct symloc enum language pst_language; }; -#define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private) +#define PST_PRIVATE(p) ((struct md_symloc *)(p)->read_symtab_private) #define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx) #define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd) #define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap) @@ -2604,8 +2604,8 @@ parse_partial_symbols (minimal_symbol_reader &reader, textlow = 0; pst = new legacy_psymtab (fdr_name (fh), partial_symtabs, objfile->per_bfd, textlow); - pst->read_symtab_private = XOBNEW (&objfile->objfile_obstack, symloc); - memset (pst->read_symtab_private, 0, sizeof (struct symloc)); + pst->read_symtab_private = XOBNEW (&objfile->objfile_obstack, md_symloc); + memset (pst->read_symtab_private, 0, sizeof (struct md_symloc)); save_pst = pst; FDR_IDX (pst) = f_idx; @@ -4649,7 +4649,7 @@ new_psymtab (const char *name, psymtab_storage *partial_symtabs, /* Keep a backpointer to the file's symbols. */ psymtab->read_symtab_private - = OBSTACK_ZALLOC (&objfile->objfile_obstack, symloc); + = OBSTACK_ZALLOC (&objfile->objfile_obstack, md_symloc); CUR_BFD (psymtab) = cur_bfd; DEBUG_SWAP (psymtab) = debug_swap; DEBUG_INFO (psymtab) = debug_info; -- cgit v1.1