summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/config/m68k/tm-m68k.h2
-rw-r--r--gdb/m68k-tdep.c31
3 files changed, 39 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 88432f19397..a1aac0f918a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-19 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0).
+ * m68k-tdep.c (m68k_gdbarch_init): Added.
+ (m68k_dump_tdep): Added.
+
2002-06-19 Daniel Jacobowitz <drow@mvista.com>
* ada-lang.c (fill_in_ada_prototype): Update comment.
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index 40bd25aa626..8f0f6a843a9 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -21,6 +21,8 @@
#include "regcache.h"
+#define GDB_MULTI_ARCH 0
+
/* Generic 68000 stuff, to be included by other tm-*.h files. */
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 8abb93d8c80..05a3e50fdec 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -677,9 +677,40 @@ m68k_saved_pc_after_call (struct frame_info *frame)
return read_memory_integer (read_register (SP_REGNUM), 4);
}
+/* Function: m68k_gdbarch_init
+ Initializer function for the m68k gdbarch vector.
+ Called by gdbarch. Sets up the gdbarch vector(s) for this target. */
+
+static struct gdbarch *
+m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch_tdep *tdep = NULL;
+ struct gdbarch *gdbarch;
+
+ /* find a candidate among the list of pre-declared architectures. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return (arches->gdbarch);
+
+#if 0
+ tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+#endif
+
+ gdbarch = gdbarch_alloc (&info, 0);
+
+ return gdbarch;
+}
+
+
+static void
+m68k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+
+}
void
_initialize_m68k_tdep (void)
{
+ gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
tm_print_insn = print_insn_m68k;
}