public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ODR warnings from overlay constants Date: Thu, 2 Jun 2022 15:29:39 +0000 (GMT) [thread overview] Message-ID: <20220602152939.2C4823955CA1@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c8e41b5f14d38c4317b2d1b82974a48828f014f7 commit c8e41b5f14d38c4317b2d1b82974a48828f014f7 Author: Tom Tromey <tromey@adacore.com> Date: Wed May 18 10:06:17 2022 -0600 ODR warnings from overlay constants Some overlay-related constants are duplicated in z80-tdep.c, causing ODR warnings. This patch renames just the z80-specific ones. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395 Diff: --- gdb/z80-tdep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index 196884af770..0b282237c4a 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -860,9 +860,9 @@ z80_software_single_step (struct regcache *regcache) static unsigned (*cache_ovly_region_table)[3] = 0; static unsigned cache_novly_regions; static CORE_ADDR cache_ovly_region_table_base = 0; -enum ovly_index +enum z80_ovly_index { - VMA, OSIZE, MAPPED_TO_LMA + Z80_VMA, Z80_OSIZE, Z80_MAPPED_TO_LMA }; static void @@ -952,12 +952,12 @@ z80_overlay_update_1 (struct obj_section *osect) /* find region corresponding to the section VMA */ for (i = 0; i < cache_novly_regions; i++) - if (cache_ovly_region_table[i][VMA] == vma) + if (cache_ovly_region_table[i][Z80_VMA] == vma) break; if (i == cache_novly_regions) return 0; /* no such region */ - lma = cache_ovly_region_table[i][MAPPED_TO_LMA]; + lma = cache_ovly_region_table[i][Z80_MAPPED_TO_LMA]; i = 0; /* we have interest for sections with same VMA */ @@ -995,9 +995,9 @@ z80_overlay_update (struct obj_section *osect) bfd_vma vma = bfd_section_vma (bsect); for (int i = 0; i < cache_novly_regions; ++i) - if (cache_ovly_region_table[i][VMA] == vma) + if (cache_ovly_region_table[i][Z80_VMA] == vma) osect->ovly_mapped = - (cache_ovly_region_table[i][MAPPED_TO_LMA] == lma); + (cache_ovly_region_table[i][Z80_MAPPED_TO_LMA] == lma); } }
reply other threads:[~2022-06-02 15:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220602152939.2C4823955CA1@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).