From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 2C4823955CA1; Thu, 2 Jun 2022 15:29:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C4823955CA1 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 from overlay constants X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: cec000ad603ea768f5c1a6cf032770eb2d468337 X-Git-Newrev: c8e41b5f14d38c4317b2d1b82974a48828f014f7 Message-Id: <20220602152939.2C4823955CA1@sourceware.org> Date: Thu, 2 Jun 2022 15:29:39 +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:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc8e41b5f14d3= 8c4317b2d1b82974a48828f014f7 commit c8e41b5f14d38c4317b2d1b82974a48828f014f7 Author: Tom Tromey Date: Wed May 18 10:06:17 2022 -0600 ODR warnings from overlay constants =20 Some overlay-related constants are duplicated in z80-tdep.c, causing ODR warnings. This patch renames just the z80-specific ones. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D22395 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] =3D 0; static unsigned cache_novly_regions; static CORE_ADDR cache_ovly_region_table_base =3D 0; -enum ovly_index +enum z80_ovly_index { - VMA, OSIZE, MAPPED_TO_LMA + Z80_VMA, Z80_OSIZE, Z80_MAPPED_TO_LMA }; =20 static void @@ -952,12 +952,12 @@ z80_overlay_update_1 (struct obj_section *osect) =20 /* find region corresponding to the section VMA */ for (i =3D 0; i < cache_novly_regions; i++) - if (cache_ovly_region_table[i][VMA] =3D=3D vma) + if (cache_ovly_region_table[i][Z80_VMA] =3D=3D vma) break; if (i =3D=3D cache_novly_regions) return 0; /* no such region */ =20 - lma =3D cache_ovly_region_table[i][MAPPED_TO_LMA]; + lma =3D cache_ovly_region_table[i][Z80_MAPPED_TO_LMA]; i =3D 0; =20 /* we have interest for sections with same VMA */ @@ -995,9 +995,9 @@ z80_overlay_update (struct obj_section *osect) bfd_vma vma =3D bfd_section_vma (bsect); =20 for (int i =3D 0; i < cache_novly_regions; ++i) - if (cache_ovly_region_table[i][VMA] =3D=3D vma) + if (cache_ovly_region_table[i][Z80_VMA] =3D=3D vma) osect->ovly_mapped =3D - (cache_ovly_region_table[i][MAPPED_TO_LMA] =3D=3D lma); + (cache_ovly_region_table[i][Z80_MAPPED_TO_LMA] =3D=3D lma); } }