Re: [RFC] Add support for the Renesas rl78 architecture

Joel Brobecker
2012-01-26T04:57:09Z

Hi Kevin,

> Comments?

FWIW, I took a quick look at the code, although I don't know anything
about this architecture. You took the time to comment it nicely,
I also appreciate that.

> gdb/ChangeLog:
>
> * configure.tgt (rl78-*-elf): New target.
> * rl78-tdep.c: New file.
>
> include/gdb/ChangeLog:
>
> * sim-rl78.h: New file.

For the GDB bits, my only comments are with the coding style:
- There should be an empty line between a function description
and the start of its definition.
- There should be an empty line after variable declarations
- I noticed that you exceeded the 80 characters line size
a few times
- I think you want the opening curly brace on the next line
at the same column as the previous one (not indented 2 characters):

> +/* Implement the "register_name" gdbarch method. */
> +static const char *
> +rl78_register_name (struct gdbarch *gdbarch, int regnr)
> +{
> + static const char *const reg_names[] = {
> + "bank0_r0",

and

> +enum sim_rl78_regnum
> + {
> + sim_rl78_bank0_r0_regnum,
> + sim_rl78_bank0_r1_regnum,
> + sim_rl78_bank0_r2_regnum,

That's all I can really say.

--
Joel