Re: [RFC 1/9] share "cell" code

Pedro Alves
2014-02-05T20:05:51Z

On 01/20/2014 07:18 PM, Tom Tromey wrote:
> The "cell"-based printing code, like phex, was duplicated in both gdb
> and gdbserver. This patch merges the two implementations into a new
> file in common/.
>

Looks good to me, though I have to admit the choice of "cell"
for filenames feels a little "called for how its implemented,
rather than for what it actually serves" to me. IOW, this is
printing stuff, and I find it just surprising to not find it
in a file called something that at least starts with 'p', if
not 'print.h/c' even. Failing that, perhaps pcell.h/c ?

Anyway, forward it is. OK.

> 2014-01-20 Tom Tromey <tromey@redhat.com>
>
> * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
> (plongest, thirty_two, phex, phex_nz, octal2str, hex_string)
> (hex_string_custom, int_string, core_addr_to_string)
> (core_addr_to_string_nz, host_address_to_string): Move to
> common/cells.c.
> * common/cells.h: New file.
> * common/cells.c: New file
> * Makefile.in (SFILES): Add common/cells.c.
> (HFILES_NO_SRCDIR): Add common/cells.h.
> (COMMON_OBS): Add cells.o.
> (cells.o): New target.
>
> 2014-01-20 Tom Tromey <tromey@redhat.com>
>
> * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
> (plongest, thirty_two, phex_nz): Remove.
> * Makefile.in (SFILES): Add common/cells.c.
> (OBS): Add cells.o.
> (cell-ipas.o): New target.
> (cells.o): New target.
> (IPA_OBJS): Add cells-ipa.o.

--
Pedro Alves