This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 12/20] Multi-process + multiarch: GDBserver: GNU/Linux CRIS
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 11 Apr 2012 00:49:01 +0100
- Subject: [PATCH 12/20] Multi-process + multiarch: GDBserver: GNU/Linux CRIS
- References: <20120410234741.526.59368.stgit@brno.lan>
This adjusts the GNU/Linux CRIS port to new interfaces.
Completely untested.
2012-04-10 Pedro Alves <palves@redhat.com>
* linux-cris-low.c (tdesc_cris): Declare.
(cris_arch_setup): New function.
(cris_usrregs_info, regs_info): New globals.
(cris_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
---
gdb/gdbserver/linux-cris-low.c | 37 +++++++++++++++++++++++++++++++++----
1 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/linux-cris-low.c b/gdb/gdbserver/linux-cris-low.c
index 0c92e62..4ca9d55 100644
--- a/gdb/gdbserver/linux-cris-low.c
+++ b/gdb/gdbserver/linux-cris-low.c
@@ -23,6 +23,7 @@
/* Defined in auto-generated file reg-cris.c. */
void init_registers_cris (void);
+extern struct target_desc *tdesc_cris;
/* CRISv10 */
#define cris_num_regs 32
@@ -108,11 +109,33 @@ cris_reinsert_addr (void)
return pc;
}
+static void
+cris_arch_setup (void)
+{
+ current_process ()->tdesc = tdesc_cris;
+}
+
+static struct usrregs_info cris_usrregs_info =
+ {
+ cris_num_regs,
+ cris_regmap,
+ };
+
+static struct regs_info regs_info =
+ {
+ NULL, /* regset_bitmap */
+ &cris_usrregs_info,
+ };
+
+static const struct regs_info *
+cris_regs_info (void)
+{
+ return ®s_info;
+}
+
struct linux_target_ops the_low_target = {
- init_registers_cris,
- cris_num_regs,
- cris_regmap,
- NULL,
+ cris_arch_setup,
+ cris_regs_info,
cris_cannot_fetch_register,
cris_cannot_store_register,
NULL, /* fetch_register */
@@ -128,3 +151,9 @@ struct linux_target_ops the_low_target = {
0,
0,
};
+
+void
+initialize_low_arch (void)
+{
+ init_registers_cris ();
+}