From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id B0221385840C; Tue, 26 Mar 2024 18:59:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0221385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711479564; bh=n1/gpUHRtzy9R/BU4AQiDmlZf7Gdl7mLX7NV7lwcJWA=; h=From:To:Subject:Date:From; b=j8Nz6IJvjuLZvvwvmG+7MYKRx8B5s+fzAyHRVD/0IULlIt7O9c7fzUmD2HS9zOhED 9GDTHgz37FQ9XlK4yomVus480D0IIzvs5KBliXZ+on06R2OS6TvQZqGjUlYCAGpBoE BoniGrlYQARrqZitM8xGxjAF45X71bJ0vPeV2R1M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Revert "gdbserver/x86: move no-xml code earlier in x86_linux_read_description" X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: f06daade43dc8ec839e2eb3bd8b200c4b3f9682b X-Git-Newrev: 59b198a6163a23de5fdba04eb107686e1b871be0 Message-Id: <20240326185924.B0221385840C@sourceware.org> Date: Tue, 26 Mar 2024 18:59:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D59b198a6163a= 23de5fdba04eb107686e1b871be0 commit 59b198a6163a23de5fdba04eb107686e1b871be0 Author: Andrew Burgess Date: Tue Mar 26 18:53:05 2024 +0000 Revert "gdbserver/x86: move no-xml code earlier in x86_linux_read_descr= iption" =20 This reverts commit 0a7bb97ad2f2fe2d18a442dad265051e34eab13e. Diff: --- gdbserver/linux-x86-low.cc | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc index 872c3fc69c7..04202e355bb 100644 --- a/gdbserver/linux-x86-low.cc +++ b/gdbserver/linux-x86-low.cc @@ -891,22 +891,6 @@ x86_linux_read_description (void) #endif } =20 - /* If we are not allowed to send an XML target description then we need - to use the hard-wired target descriptions. This corresponds to GDB's - default machine for x86. - - This check needs to occur before any returns statements that might - generate some alternative target descriptions. */ - if (!use_xml) - { -#ifdef __x86_64__ - if (machine =3D=3D EM_X86_64) - return tdesc_amd64_linux_no_xml.get (); - else -#endif - return tdesc_i386_linux_no_xml.get (); - } - #if !defined __x86_64__ && defined HAVE_PTRACE_GETFPXREGS if (machine =3D=3D EM_386 && have_ptrace_getfpxregs =3D=3D -1) { @@ -923,6 +907,17 @@ x86_linux_read_description (void) } #endif =20 + if (!use_xml) + { + /* Don't use XML. */ +#ifdef __x86_64__ + if (machine =3D=3D EM_X86_64) + return tdesc_amd64_linux_no_xml.get (); + else +#endif + return tdesc_i386_linux_no_xml.get (); + } + if (have_ptrace_getregset =3D=3D TRIBOOL_UNKNOWN) { uint64_t xstateregs[(X86_XSTATE_SSE_SIZE / sizeof (uint64_t))];