public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Revert "gdbserver/x86: move no-xml code earlier in x86_linux_read_description"
Date: Tue, 26 Mar 2024 18:59:24 +0000 (GMT)	[thread overview]
Message-ID: <20240326185924.B0221385840C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=59b198a6163a23de5fdba04eb107686e1b871be0

commit 59b198a6163a23de5fdba04eb107686e1b871be0
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Tue Mar 26 18:53:05 2024 +0000

    Revert "gdbserver/x86: move no-xml code earlier in x86_linux_read_description"
    
    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
     }
 
-  /* 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 == 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 == EM_386 && have_ptrace_getfpxregs == -1)
     {
@@ -923,6 +907,17 @@ x86_linux_read_description (void)
     }
 #endif
 
+  if (!use_xml)
+    {
+      /* Don't use XML.  */
+#ifdef __x86_64__
+      if (machine == EM_X86_64)
+	return tdesc_amd64_linux_no_xml.get ();
+      else
+#endif
+	return tdesc_i386_linux_no_xml.get ();
+    }
+
   if (have_ptrace_getregset == TRIBOOL_UNKNOWN)
     {
       uint64_t xstateregs[(X86_XSTATE_SSE_SIZE / sizeof (uint64_t))];

                 reply	other threads:[~2024-03-26 18:59 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=20240326185924.B0221385840C@sourceware.org \
    --to=aburgess@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: link
Be 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).