Set proc->priv->new_inferior out of linux_add_process
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-bfin-low.c
index 0568b19d5a24399b74a62485c1f458013d577ac2..4002f220d59839177155e8273785ccd7c4ef53ff 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU/Linux/BFIN specific low level interface, for the remote server for GDB.
 
-   Copyright (C) 2005-2013 Free Software Foundation, Inc.
+   Copyright (C) 2005-2015 Free Software Foundation, Inc.
 
    Contributed by Analog Devices, Inc.
 
 
 #include "server.h"
 #include "linux-low.h"
-#include "libiberty.h"
 #include <asm/ptrace.h>
 
 /* Defined in auto-generated file reg-bfin.c.  */
 void init_registers_bfin (void);
+extern const struct target_desc *tdesc_bfin;
 
 static int bfin_regmap[] =
 {
@@ -90,11 +90,33 @@ bfin_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
+static void
+bfin_arch_setup (void)
+{
+  current_process ()->tdesc = tdesc_bfin;
+}
+
+static struct usrregs_info bfin_usrregs_info =
+  {
+    bfin_num_regs,
+    bfin_regmap,
+  };
+
+static struct regs_info regs_info =
+  {
+    NULL, /* regset_bitmap */
+    &bfin_usrregs_info,
+  };
+
+static const struct regs_info *
+bfin_regs_info (void)
+{
+  return &regs_info;
+}
+
 struct linux_target_ops the_low_target = {
-  init_registers_bfin,
-  bfin_num_regs,
-  bfin_regmap,
-  NULL,
+  bfin_arch_setup,
+  bfin_regs_info,
   bfin_cannot_fetch_register,
   bfin_cannot_store_register,
   NULL, /* fetch_register */
@@ -102,7 +124,14 @@ struct linux_target_ops the_low_target = {
   bfin_set_pc,
   bfin_breakpoint,
   bfin_breakpoint_len,
-  0,
+  NULL, /* breakpoint_reinsert_addr */
   2,
   bfin_breakpoint_at,
 };
+
+
+void
+initialize_low_arch (void)
+{
+  init_registers_bfin ();
+}
This page took 0.025558 seconds and 4 git commands to generate.