This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Add monitor support for 68HC11/68HC12
- To: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Subject: Re: [RFA]: Add monitor support for 68HC11/68HC12
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 29 Jan 2001 18:08:48 -0800
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <3A2976A4.CE271B65@worldnet.fr>
Stephane Carrez wrote:
>
> Hi!
>
> I would like to have approval for the following patch that adds support
> for monitors to 68HC11/68HC12 targets. It supports the Motorola Buffalo
> monitor (tested using Axiom Manufacturing CME-11E9-EVBU MC68HC11 board).
Here are some suggestions that will hopefully help the code to last for
longer :-)
> + /* Register numbers of various important registers. */
> + #define HARD_X_REGNUM 0
> + #define HARD_D_REGNUM 1
I'd change this to enums.
> + /* This array of registers needs to match the indexes used by GDB. The
> + whole reason this exists is because the various ROM monitors use
> + different names than GDB does, and don't support all the registers
> + either. So, typing "info reg sp" becomes an "A7". */
Can this be changed to a function? something like:
switch (regnum)
M68HC11_X: return HARD_X_REGNUM;
Andrew