From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [RFC 1/7] Move initialize_tdesc_mips* calls from mips-linux-nat.c to mips-linux-tdep.c
Date: Thu, 11 May 2017 15:55:00 -0000 [thread overview]
Message-ID: <1494518105-15412-2-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1494518105-15412-1-git-send-email-yao.qi@linaro.org>
Target description initialization are called in -tdep.c, instead of -nat.c
I've posted it separately
https://sourceware.org/ml/gdb-patches/2017-05/msg00204.html, include
it here to give more context.
gdb:
2017-05-09 Yao Qi <yao.qi@linaro.org>
* mips-linux-nat.c: Move include features/mips*-linux.c to
mips-linux-tdep.c.
(_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
to mips-linux-tdep.c.
* mips-linux-tdep.c: Include features/mips*-linux.c
(_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
functions.
* mips-linux-tdep.h (tdesc_mips_linux): Declare.
(tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
(tdesc_mips64_dsp_linux): Declare.
---
gdb/mips-linux-nat.c | 11 -----------
gdb/mips-linux-tdep.c | 11 +++++++++++
gdb/mips-linux-tdep.h | 6 ++++++
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 8041d84..1fd3365 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -38,11 +38,6 @@
#include "nat/mips-linux-watch.h"
-#include "features/mips-linux.c"
-#include "features/mips-dsp-linux.c"
-#include "features/mips64-linux.c"
-#include "features/mips64-dsp-linux.c"
-
#ifndef PTRACE_GET_THREAD_AREA
#define PTRACE_GET_THREAD_AREA 25
#endif
@@ -803,10 +798,4 @@ triggers a breakpoint or watchpoint."),
linux_nat_add_target (t);
linux_nat_set_new_thread (t, mips_linux_new_thread);
-
- /* Initialize the standard target descriptions. */
- initialize_tdesc_mips_linux ();
- initialize_tdesc_mips_dsp_linux ();
- initialize_tdesc_mips64_linux ();
- initialize_tdesc_mips64_dsp_linux ();
}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 48a582a..0f22a92 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -40,6 +40,11 @@
#include "xml-syscall.h"
#include "gdb_signals.h"
+#include "features/mips-linux.c"
+#include "features/mips-dsp-linux.c"
+#include "features/mips64-linux.c"
+#include "features/mips64-dsp-linux.c"
+
static struct target_so_ops mips_svr4_so_ops;
/* This enum represents the signals' numbers on the MIPS
@@ -1764,4 +1769,10 @@ _initialize_mips_linux_tdep (void)
GDB_OSABI_LINUX,
mips_linux_init_abi);
}
+
+ /* Initialize the standard target descriptions. */
+ initialize_tdesc_mips_linux ();
+ initialize_tdesc_mips_dsp_linux ();
+ initialize_tdesc_mips64_linux ();
+ initialize_tdesc_mips64_dsp_linux ();
}
diff --git a/gdb/mips-linux-tdep.h b/gdb/mips-linux-tdep.h
index 407b577..cca4798 100644
--- a/gdb/mips-linux-tdep.h
+++ b/gdb/mips-linux-tdep.h
@@ -105,3 +105,9 @@ enum {
/* Return 1 if MIPS_RESTART_REGNUM is usable. */
int mips_linux_restart_reg_p (struct gdbarch *gdbarch);
+
+/* Target descriptions. */
+extern struct target_desc *tdesc_mips_linux;
+extern struct target_desc *tdesc_mips64_linux;
+extern struct target_desc *tdesc_mips_dsp_linux;
+extern struct target_desc *tdesc_mips64_dsp_linux;
--
1.9.1
next prev parent reply other threads:[~2017-05-11 15:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 15:55 [RFC 0/7] Make GDB builtin target descriptions more flexible Yao Qi
2017-05-11 15:55 ` [RFC 6/7] Lazily and dynamically create i386-linux target descriptions Yao Qi
2017-05-11 18:14 ` John Baldwin
2017-05-11 21:03 ` Yao Qi
2017-05-17 15:43 ` Pedro Alves
2017-05-18 15:12 ` Yao Qi
2017-05-19 10:15 ` Pedro Alves
2017-05-19 14:27 ` Yao Qi
2017-05-11 15:55 ` [RFC 5/7] Centralize i386 linux " Yao Qi
2017-05-11 15:55 ` [RFC 7/7] Remove builtin tdesc_i386_*_linux Yao Qi
2017-05-16 12:02 ` Philipp Rudo
2017-05-17 15:46 ` Pedro Alves
2017-05-11 15:55 ` Yao Qi [this message]
2017-05-11 15:55 ` [RFC 2/7] Add unit test to builtin tdesc generated by xml Yao Qi
2017-05-16 12:00 ` Philipp Rudo
2017-05-16 15:46 ` Yao Qi
2017-05-17 9:09 ` Philipp Rudo
2017-05-17 16:06 ` Pedro Alves
2017-05-30 8:00 ` Philipp Rudo
2017-06-01 17:53 ` Philipp Rudo
2017-05-17 15:41 ` Pedro Alves
2017-05-18 9:54 ` Yao Qi
2017-05-18 11:34 ` Pedro Alves
2017-05-19 15:47 ` Yao Qi
2017-05-22 8:51 ` Yao Qi
2017-05-11 15:55 ` [RFC 3/7] Adjust the order of 32bit-linux.xml and 32bit-sse.xml in i386/i386-linux.xml Yao Qi
2017-05-11 16:06 ` [RFC 0/7] Make GDB builtin target descriptions more flexible Eli Zaretskii
2017-05-11 20:56 ` Yao Qi
2017-05-11 20:55 ` [RFC 4/7] Share code in initialize_tdesc_ functions Yao Qi
2017-05-16 12:02 ` Philipp Rudo
2017-05-17 15:43 ` Pedro Alves
2017-05-18 11:21 ` 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=1494518105-15412-2-git-send-email-yao.qi@linaro.org \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@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).