From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10626 invoked by alias); 19 Jun 2002 19:20:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10609 invoked from network); 19 Jun 2002 19:20:14 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 19 Jun 2002 19:20:14 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g5JJBI923860 for ; Wed, 19 Jun 2002 15:11:18 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g5JJKEr15719 for ; Wed, 19 Jun 2002 15:20:14 -0400 Received: from redhat.com (IDENT:ys9hoKVYU3dOMZn4GdELrKhCeCyNQh7+@tomago.toronto.redhat.com [172.16.14.60]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g5JJKDV12411 for ; Wed, 19 Jun 2002 15:20:13 -0400 Message-ID: <3D10D96D.10906674@redhat.com> Date: Wed, 19 Jun 2002 12:20:00 -0000 From: Grace Sainsbury X-Accept-Language: en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: PATCH: m68k multi-arch Content-Type: multipart/mixed; boundary="------------044AA9EE4502CABCD2A7AE6A" X-SW-Source: 2002-06/txt/msg00378.txt.bz2 This is a multi-part message in MIME format. --------------044AA9EE4502CABCD2A7AE6A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 279 I've started to multi-arch the m68k. I just added the init and dump functions. grace Changelog: 2002-06-19 Grace Sainsbury * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0). * m68k-tdep.c (m68k_gdbarch_init): Added. (m68k_dump_tdep): Added. --------------044AA9EE4502CABCD2A7AE6A Content-Type: text/plain; charset=us-ascii; name="m68k_1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="m68k_1.patch" Content-length: 1791 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 --------------044AA9EE4502CABCD2A7AE6A--