This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] arc: Add a gdbarch_tdep structure
- From: Anton Kolesov <akolesov at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 12 Oct 2016 11:52:00 -0000
- Subject: [binutils-gdb] arc: Add a gdbarch_tdep structure
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b845c31ecc4fe2677f1d938b0d8a3dc98397158e
commit b845c31ecc4fe2677f1d938b0d8a3dc98397158e
Author: Anton Kolesov <Anton.Kolesov@synopsys.com>
Date: Wed Oct 12 14:36:44 2016 +0300
arc: Add a gdbarch_tdep structure
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.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/arc-tdep.c | 5 ++++-
gdb/arc-tdep.h | 6 ++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 73a59bb..29544c9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 60a4e04..58de8e9 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -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);
diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h
index 1b2694b..ea34b9e 100644
--- a/gdb/arc-tdep.h
+++ b/gdb/arc-tdep.h
@@ -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