From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D5F63851C0A; Tue, 19 May 2020 08:07:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D5F63851C0A From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/25981] Use of short i386 register names breaks compilation on recent Solaris 11.4 Date: Tue, 19 May 2020 08:07:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ro at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2020 08:07:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25981 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The gdb-9-branch branch has been updated by Rainer Orth : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3bfcbaaa2b23= 824b1584d2782be64820e4a35acb commit 3bfcbaaa2b23824b1584d2782be64820e4a35acb Author: Rainer Orth Date: Tue May 19 10:06:00 2020 +0200 Avoid short i386 register names on Solaris/x86 [PR25981] This is the 32-bit companion to Remove unused ps_lgetLDT etc. on Solaris/x86 [PR25981] https://sourceware.org/pipermail/gdb-patches/2020-May/168713.ht= ml A 32-bit-default gdb fails to compile with the updated . While it is also affected by the lack of a GS definition, which the compantion patch above fixes, it also fails to compile i386-sol2-nat.c = like this /vol/src/gnu/gdb/hg/master/git/gdb/i386-sol2-nat.c:181:3: error: 'EAX' = was not declared in this scope 181 | EAX, ECX, EDX, EBX, | ^~~ and several more. While this could be fixed by either including here or provding fallback definitions of the register macros, I chose to do what the 64-bit-default code in the same file (amd64_sol2_gregset32_reg_offset[]) does, namely just hardcode the numeric values instead. They are part of the ABI and thus guaranteed not to change. With this patch, a i386-pc-solaris2.11 configuration on master compiles again, however, it doesn't work. However, I could successfully test it on the gdb-9 branch. Compiling and testing proved to be messy, unfortunately: * For one, Solaris and largefile support used to be mutually exclusive (fixed in Solaris 11.4 and Illumos), which was exacerbated by the fact that g++ predefines _FILE_OFFSET_BITS=3D64 si= nce GCC 9.1.0. For now I've worked around this by adding -U_FILE_OFFSET_BITS to CXXFLAGS and configuring with --disable-largefile. I hope to clean this up in a future patch. * gdb still defaults to startup-with-shell on. However, /bin/bash is a 64-bit executable which cannot be debugged by a 32-bit gdb. I hacked around that part by pointing $SHELL at a 32-bit bash before running make check. PR build/25981 * i386-sol2-nat.c [PR_MODEL_NATIVE !=3D PR_MODEL_LP64] (regmap): Hardcode register numbers. --=20 You are receiving this mail because: You are on the CC list for the bug.=