This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New target am33-linux (mn10300)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Snyder <msnyder at sonic dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 29 Apr 2005 21:45:31 -0400
- Subject: Re: [RFA] New target am33-linux (mn10300)
- References: <4272D60B.5050709@sonic.net>
On Fri, Apr 29, 2005 at 05:49:15PM -0700, Michael Snyder wrote:
> Index: mn10300-linux-tdep.c
> ===================================================================
> RCS file: mn10300-linux-tdep.c
> diff -N mn10300-linux-tdep.c
> *** /dev/null 1 Jan 1970 00:00:00 -0000
> --- mn10300-linux-tdep.c 30 Apr 2005 00:28:15 -0000
> ***************
> *** 0 ****
> --- 1,221 ----
> + /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
> + Copyright 2003
> + Free Software Foundation, Inc.
Welcome to 2005 :-) This has indeed been languishing...
> + /* Transliterated from <asm-mn10300/elf.h>... */
> + #define ELF_NGREG 27
> + #define ELF_NFPREG 32
> +
> + typedef unsigned char elf_greg_t[4];
> + typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> +
> + typedef unsigned char elf_fpreg_t[4];
> + typedef struct
> + {
> + elf_fpreg_t fpregs[ELF_NFPREG];
> + unsigned char fpcr[4];
> + } elf_fpregset_t;
Past experience tells me that this is a bad idea; please pick names for
these types (and the other constants) which won't conflict with types
in the system headers.
> + /* Use a local version of this function to get the correct types for
> + regsets, until multi-arch core support is ready. */
> +
> + static void
> + fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
> + int which, CORE_ADDR reg_addr)
Lots of stray braces in this function. But also...
> + void
> + _initialize_mn10300_linux_tdep (void)
> + {
> + deprecated_add_core_fns (®set_core_fns);
> + }
... that's a pretty good hint that you should update this. Please see
i386_regset_from_core_section instead.
--
Daniel Jacobowitz
CodeSourcery, LLC