aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68k-tdep.c
diff options
context:
space:
mode:
authorGrace Sainsbury <graces@redhat.com>2002-06-19 20:44:22 +0000
committerGrace Sainsbury <graces@redhat.com>2002-06-19 20:44:22 +0000
commit152d9db60b685e50b9ed9515b694d496c571ddc3 (patch)
tree0a1103660fbd772b8bead5a27b8a2e42ed744069 /gdb/m68k-tdep.c
parentb2bd228ec0086f1bbbad38be0741e7cc71951e3a (diff)
downloadfsf-binutils-gdb-152d9db60b685e50b9ed9515b694d496c571ddc3.zip
fsf-binutils-gdb-152d9db60b685e50b9ed9515b694d496c571ddc3.tar.gz
fsf-binutils-gdb-152d9db60b685e50b9ed9515b694d496c571ddc3.tar.bz2
Added functions for multi-arch.
Diffstat (limited to 'gdb/m68k-tdep.c')
-rw-r--r--gdb/m68k-tdep.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 8abb93d..05a3e50 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;
}