Rename common to gdbsupport
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-x86-tdesc.c
index 9eb61a7208f3a0210ee0ff2136db15039fa120d8..b39ed53549bdd4b6a6adea2f30ec3ad75c2bda0b 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU/Linux/x86-64 specific target description, for the remote server
    for GDB.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "tdesc.h"
 #include "linux-x86-tdesc.h"
 #include "arch/i386.h"
-#include "common/x86-xstate.h"
+#include "gdbsupport/x86-xstate.h"
 #ifdef __x86_64__
 #include "arch/amd64.h"
 #endif
+#include "x86-tdesc.h"
 
 /* Return the right x86_linux_tdesc index for a given XCR0.  Return
    X86_TDESC_LAST if can't find a match.  */
@@ -68,10 +69,10 @@ xcr0_to_tdesc_idx (uint64_t xcr0, bool is_x32)
     return X86_TDESC_LAST;
 }
 
-static struct target_desc *i386_tdescs[X86_TDESC_LAST] = { };
-
 #if defined __i386__ || !defined IN_PROCESS_AGENT
 
+static struct target_desc *i386_tdescs[X86_TDESC_LAST] = { };
+
 /* Return the target description according to XCR0.  */
 
 const struct target_desc *
@@ -86,14 +87,9 @@ i386_linux_read_description (uint64_t xcr0)
 
   if (*tdesc == NULL)
     {
-      *tdesc = i386_create_target_description (xcr0);
-
-      init_target_desc (*tdesc);
+      *tdesc = i386_create_target_description (xcr0, true, false);
 
-#ifndef IN_PROCESS_AGENT
-      static const char *expedite_regs_i386[] = { "ebp", "esp", "eip", NULL };
-      (*tdesc)->expedite_regs = expedite_regs_i386;
-#endif
+      init_target_desc (*tdesc, i386_expedite_regs);
     }
 
   return *tdesc;;
@@ -122,14 +118,9 @@ amd64_linux_read_description (uint64_t xcr0, bool is_x32)
 
   if (*tdesc == NULL)
     {
-      *tdesc = amd64_create_target_description (xcr0, is_x32);
-
-      init_target_desc (*tdesc);
+      *tdesc = amd64_create_target_description (xcr0, is_x32, true, true);
 
-#ifndef IN_PROCESS_AGENT
-      static const char *expedite_regs_amd64[] = { "rbp", "rsp", "rip", NULL };
-      (*tdesc)->expedite_regs = expedite_regs_amd64;
-#endif
+      init_target_desc (*tdesc, amd64_expedite_regs);
     }
   return *tdesc;
 }
This page took 0.024727 seconds and 4 git commands to generate.