/* 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. */
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 *
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;;
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;
}