]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
arc: Add a gdbarch_tdep structure
authorAnton Kolesov <Anton.Kolesov@synopsys.com>
Wed, 12 Oct 2016 11:36:44 +0000 (14:36 +0300)
committerAnton Kolesov <Anton.Kolesov@synopsys.com>
Wed, 12 Oct 2016 11:47:09 +0000 (14:47 +0300)
Add target-specific structure gdbarch_tdep for ARC.

gdb/ChangeLog:

* arc-tdep.h (struct gdbarch_tdep): New.
* arc-tdep.c (arc_gdbarch_init): Allocate gdbarch_tdep.

gdb/ChangeLog
gdb/arc-tdep.c
gdb/arc-tdep.h

index 73a59bb6335ff362639b6ecbdfc57757f3177721..29544c936cf6520b36de0de714b38425a922a345 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-12  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * arc-tdep.h (struct gdbarch_tdep): New.
+       * arc-tdep.c (arc_gdbarch_init): Allocate gdbarch_tdep.
+
 2016-10-12  Yao Qi  <yao.qi@linaro.org>
 
        PR tdep/20682
index 60a4e0442d4ec12e3f8c70c630eace1a4cf7558e..58de8e9c868d4599de83684c5a068c5a07217c36 100644 (file)
@@ -1159,7 +1159,10 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   if (!arc_tdesc_init (info, &tdesc, &tdesc_data))
     return NULL;
 
-  struct gdbarch *gdbarch = gdbarch_alloc (&info, NULL);
+  /* Allocate the ARC-private target-dependent information structure, and the
+     GDB target-independent information structure.  */
+  struct gdbarch_tdep *tdep = XCNEW (struct gdbarch_tdep);
+  struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Data types.  */
   set_gdbarch_short_bit (gdbarch, 16);
index 1b2694b69b7a2248a0554b1b725261c541ddd778..ea34b9e8610c66fd9f421462061ab8dbb761478e 100644 (file)
@@ -77,6 +77,12 @@ enum arc_regnum
 
 extern int arc_debug;
 
+/* Target-dependent information.  */
+
+struct gdbarch_tdep
+{
+};
+
 /* Utility functions used by other ARC-specific modules.  */
 
 static inline int