aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-03-26 18:53:05 +0000
committerAndrew Burgess <aburgess@redhat.com>2024-03-26 18:53:05 +0000
commit59b198a6163a23de5fdba04eb107686e1b871be0 (patch)
treefd4426a73ce5dfb466d998c5a25d7fb72a9d2c13 /gdbserver
parentf06daade43dc8ec839e2eb3bd8b200c4b3f9682b (diff)
downloadgdb-59b198a6163a23de5fdba04eb107686e1b871be0.zip
gdb-59b198a6163a23de5fdba04eb107686e1b871be0.tar.gz
gdb-59b198a6163a23de5fdba04eb107686e1b871be0.tar.bz2
Revert "gdbserver/x86: move no-xml code earlier in x86_linux_read_description"
This reverts commit 0a7bb97ad2f2fe2d18a442dad265051e34eab13e.
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/linux-x86-low.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
index 872c3fc..04202e3 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))];