This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: Add monitor support for 68HC11/68HC12


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]