diff options
author | Tom Tromey <tromey@adacore.com> | 2022-05-10 08:56:26 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-06-02 09:04:45 -0600 |
commit | 77845a9ac6871b2480b1533b70831db320233885 (patch) | |
tree | 9f69ab84ed168e443bf4a66fb8c6f3f7374e686a /gdb/mdebugread.c | |
parent | 57ebc9901305133000100fa7764dac94b4208a3b (diff) | |
download | fsf-binutils-gdb-77845a9ac6871b2480b1533b70831db320233885.zip fsf-binutils-gdb-77845a9ac6871b2480b1533b70831db320233885.tar.gz fsf-binutils-gdb-77845a9ac6871b2480b1533b70831db320233885.tar.bz2 |
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
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |