From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Cc: jhb@freebsd.org
Subject: [PATCH 01/22] Use amd64_target_description to get tdesc_amd64
Date: Mon, 21 Aug 2017 15:29:00 -0000 [thread overview]
Message-ID: <1503329347-26711-2-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1503329347-26711-1-git-send-email-yao.qi@linaro.org>
This patch changes amd64-*-tdep.c files to use function
amd64_target_description to get the right target description rather than
use the variable tdesd_amd64.
gdb:
2017-08-18 Yao Qi <yao.qi@linaro.org>
* amd64-darwin-tdep.c: Include "x86-xstate.h".
(x86_darwin_init_abi_64): Call amd64_target_description.
* amd64-dicos-tdep.c: Likewise.
* amd64-fbsd-nat.c: Likewise.
* amd64-fbsd-tdep.c: Likewise.
* amd64-nbsd-tdep.c: Likewise.
* amd64-obsd-tdep.c: Likewise.
* amd64-sol2-tdep.c: Likewise.
* amd64-windows-tdep.c: Likewise.
* amd64-tdep.h (tdesc_amd64): Remove the declaration.
---
gdb/amd64-darwin-tdep.c | 4 +++-
gdb/amd64-dicos-tdep.c | 4 +++-
gdb/amd64-fbsd-nat.c | 2 +-
gdb/amd64-fbsd-tdep.c | 3 ++-
gdb/amd64-nbsd-tdep.c | 4 +++-
gdb/amd64-obsd-tdep.c | 4 +++-
gdb/amd64-sol2-tdep.c | 4 +++-
gdb/amd64-tdep.h | 2 --
gdb/amd64-windows-tdep.c | 4 +++-
9 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index be26d9e..81dba82 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -29,6 +29,7 @@
#include "objfiles.h"
#include "i387-tdep.h"
+#include "x86-xstate.h"
#include "amd64-tdep.h"
#include "osabi.h"
#include "ui-out.h"
@@ -99,7 +100,8 @@ x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
tdep->struct_return = reg_struct_return;
diff --git a/gdb/amd64-dicos-tdep.c b/gdb/amd64-dicos-tdep.c
index 7bdb167..d319dd9 100644
--- a/gdb/amd64-dicos-tdep.c
+++ b/gdb/amd64-dicos-tdep.c
@@ -20,12 +20,14 @@
#include "defs.h"
#include "osabi.h"
#include "amd64-tdep.h"
+#include "x86-xstate.h"
#include "dicos-tdep.h"
static void
amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
dicos_init_abi (gdbarch);
}
diff --git a/gdb/amd64-fbsd-nat.c b/gdb/amd64-fbsd-nat.c
index 1fe0d56..f3ddbdd 100644
--- a/gdb/amd64-fbsd-nat.c
+++ b/gdb/amd64-fbsd-nat.c
@@ -179,7 +179,7 @@ amd64fbsd_read_description (struct target_ops *ops)
}
#endif
if (is64)
- return tdesc_amd64;
+ return amd64_target_description (X86_XSTATE_SSE_MASK);
else
return tdesc_i386;
}
diff --git a/gdb/amd64-fbsd-tdep.c b/gdb/amd64-fbsd-tdep.c
index ad4d787..897cab9 100644
--- a/gdb/amd64-fbsd-tdep.c
+++ b/gdb/amd64-fbsd-tdep.c
@@ -217,7 +217,8 @@ amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->gregset_num_regs = ARRAY_SIZE (amd64fbsd_r_reg_offset);
tdep->sizeof_gregset = 22 * 8;
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
tdep->sigtramp_p = amd64fbsd_sigtramp_p;
tdep->sigtramp_start = amd64fbsd_sigtramp_start_addr;
diff --git a/gdb/amd64-nbsd-tdep.c b/gdb/amd64-nbsd-tdep.c
index 02bf427..9ae02272 100644
--- a/gdb/amd64-nbsd-tdep.c
+++ b/gdb/amd64-nbsd-tdep.c
@@ -25,6 +25,7 @@
#include "symtab.h"
#include "amd64-tdep.h"
+#include "x86-xstate.h"
#include "nbsd-tdep.h"
#include "solib-svr4.h"
@@ -103,7 +104,8 @@ amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->gregset_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
tdep->sizeof_gregset = 26 * 8;
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
tdep->jb_pc_offset = 7 * 8;
diff --git a/gdb/amd64-obsd-tdep.c b/gdb/amd64-obsd-tdep.c
index ad90c20..54942cc 100644
--- a/gdb/amd64-obsd-tdep.c
+++ b/gdb/amd64-obsd-tdep.c
@@ -32,6 +32,7 @@
#include "obsd-tdep.h"
#include "amd64-tdep.h"
#include "i387-tdep.h"
+#include "x86-xstate.h"
#include "solib-svr4.h"
#include "bsd-uthread.h"
@@ -419,7 +420,8 @@ amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
obsd_init_abi (info, gdbarch);
/* Initialize general-purpose register set details. */
diff --git a/gdb/amd64-sol2-tdep.c b/gdb/amd64-sol2-tdep.c
index ca474db..1ae2edc 100644
--- a/gdb/amd64-sol2-tdep.c
+++ b/gdb/amd64-sol2-tdep.c
@@ -28,6 +28,7 @@
#include "sol2-tdep.h"
#include "amd64-tdep.h"
+#include "x86-xstate.h"
#include "solib-svr4.h"
/* Mapping between the general-purpose registers in gregset_t format
@@ -99,7 +100,8 @@ amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->gregset_num_regs = ARRAY_SIZE (amd64_sol2_gregset_reg_offset);
tdep->sizeof_gregset = 28 * 8;
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
tdep->sigtramp_p = amd64_sol2_sigtramp_p;
tdep->sigcontext_addr = amd64_sol2_mcontext_addr;
diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h
index 23fa5b8..047af3f 100644
--- a/gdb/amd64-tdep.h
+++ b/gdb/amd64-tdep.h
@@ -87,8 +87,6 @@ enum amd64_regnum
#define AMD64_NUM_REGS (AMD64_GSBASE_REGNUM + 1)
-extern struct target_desc *tdesc_amd64;
-
extern struct displaced_step_closure *amd64_displaced_step_copy_insn
(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to,
struct regcache *regs);
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 9158282..5ac73bd 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -18,6 +18,7 @@
#include "defs.h"
#include "osabi.h"
#include "amd64-tdep.h"
+#include "x86-xstate.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "regcache.h"
@@ -1224,7 +1225,8 @@ amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
*/
frame_unwind_append_unwinder (gdbarch, &amd64_windows_frame_unwind);
- amd64_init_abi (info, gdbarch, tdesc_amd64);
+ amd64_init_abi (info, gdbarch,
+ amd64_target_description (X86_XSTATE_SSE_MASK));
windows_init_abi (info, gdbarch);
--
1.9.1
next prev parent reply other threads:[~2017-08-21 15:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 15:29 [PATCH 00/22 v4] Make GDB builtin target descriptions more flexible Yao Qi
2017-08-21 15:29 ` [PATCH 09/22] [GDBserver] unit test to i386_tdesc Yao Qi
2017-08-21 15:29 ` [PATCH 19/22] [GDBserver] Use pre-generated amd64-linux tdesc as test Yao Qi
2017-08-21 15:29 ` [PATCH 08/22] [GDBserver] Centralize tdesc for i386-linux Yao Qi
2017-08-21 15:29 ` [PATCH 05/22] Adjust code generated by regformats/regdat.sh Yao Qi
2017-08-21 15:29 ` [PATCH 11/22] Share i386-linux target description between GDB and GDBserver Yao Qi
2017-08-21 15:29 ` [PATCH 16/22] Centralize amd64-linux target descriptions Yao Qi
2017-08-21 15:29 ` [PATCH 15/22] Update comments in amd64_linux_core_read_description Yao Qi
2017-08-21 15:29 ` Yao Qi [this message]
2017-08-21 15:29 ` [PATCH 04/22] Let i386_target_description return tdesc_i386_mmx Yao Qi
2017-08-21 15:29 ` [PATCH 03/22] Return X86_XSTATE_SSE_MASK instead of 0 in i386fbsd_core_read_xcr0 Yao Qi
2017-08-21 16:23 ` John Baldwin
2017-08-21 16:46 ` Yao Qi
2017-08-21 17:00 ` John Baldwin
2017-08-21 15:29 ` [PATCH 20/22] [GDBserver] Shorten srv_amd64_linux_xmlfiles Yao Qi
2017-08-21 15:30 ` [PATCH 18/22] Convert amd64-linux target descriptions Yao Qi
2017-08-21 15:31 ` [PATCH 02/22] Use i386_target_description to get tdesc_i386 Yao Qi
2017-08-21 16:23 ` John Baldwin
2017-08-21 15:31 ` [PATCH 07/22] Return X86_TDESC_MMX in x86_get_ipa_tdesc_idx Yao Qi
2017-08-21 15:31 ` [PATCH 06/22] Use VEC for target_desc.reg_defs Yao Qi
2017-08-21 15:31 ` [PATCH 21/22] Remove features/i386/amd64-*linux.c and features/i386/x32-*linux.c Yao Qi
2017-08-21 15:31 ` [PATCH 17/22] Lazily and dynamically create amd64-linux target descriptions Yao Qi
2017-08-21 15:31 ` [PATCH 12/22] Remove features/i386/i386-*linux.c Yao Qi
2017-08-21 15:31 ` [PATCH 22/22] Convert the rest x86 target descriptions Yao Qi
2017-08-21 15:31 ` [PATCH 10/22] Dynamically composite xml in reply to GDB Yao Qi
2017-08-21 15:31 ` [PATCH 14/22] [GDBserver] Shorten srv_i386_linux_xmlfiles Yao Qi
2017-08-21 15:31 ` [PATCH 13/22] [GDBserver] Use pre-generated tdesc as test Yao Qi
2017-09-05 9:04 ` [PATCH 00/22 v4] Make GDB builtin target descriptions more flexible Yao Qi
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=1503329347-26711-2-git-send-email-yao.qi@linaro.org \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.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