From: Grace Sainsbury <graces@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: m68k multi-arch
Date: Wed, 19 Jun 2002 12:20:00 -0000 [thread overview]
Message-ID: <3D10D96D.10906674@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
I've started to multi-arch the m68k. I just added the init and dump
functions.
grace
Changelog:
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.
[-- Attachment #2: m68k_1.patch --]
[-- Type: text/plain, Size: 1791 bytes --]
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.15
diff -u -r1.15 m68k-tdep.c
--- m68k-tdep.c 17 Jun 2002 21:39:01 -0000 1.15
+++ m68k-tdep.c 19 Jun 2002 18:23:42 -0000
@@ -677,9 +677,40 @@
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;
}
Index: config/m68k/tm-m68k.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-m68k.h,v
retrieving revision 1.11
diff -u -r1.11 tm-m68k.h
--- config/m68k/tm-m68k.h 14 Jun 2002 22:55:46 -0000 1.11
+++ config/m68k/tm-m68k.h 19 Jun 2002 18:23:42 -0000
@@ -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
next reply other threads:[~2002-06-19 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-19 12:20 Grace Sainsbury [this message]
2002-06-19 20:21 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D10D96D.10906674@redhat.com \
--to=graces@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox