Re: [PATCH 1/7] Move make_cleanup_close to common code

Doug Evans
2015-04-17T02:47:01Z

On Thu, Apr 16, 2015 at 5:19 AM, Gary Benson <gbenson@redhat.com> wrote:
> This commit moves the function make_cleanup_close from gdb/utils.[ch]
> to gdb/common/cleanup-utils.[ch] to make it usable from common code.
> A new file was created over putting the function in common-utils.[ch]
> to avoid having to build cleanups.c into the in-process agent.
>
> gdb/ChangeLog:
>
> * common/cleanup-utils.h: New file.
> * common/cleanup-utils.c: Likewise.
> * Makefile.in (SFILES): Add common/cleanup-utils.c.
> (HFILES_NO_SRCDIR): Add common/cleanup-utils.h.
> (COMMON_OBS): Add cleanup-utils.o.
> (cleanup-utils.o): New rule.
> * common/common-utils.h (cleanup-utils.h): New include.
> * utils.h (make_cleanup_close): Moved to cleanup-utils.h.
> * utils.c (do_close_cleanup): Moved to cleanup-utils.c.
> (make_cleanup_close): Likewise.
>
> gdb/gdbserver/ChangeLog:
>
> * Makefile.in (SFILES): Add common/cleanup-utils.c.
> (OBS): Add cleanup-utils.o.
> (cleanup-utils.o): New rule.

Hi.

I haven't reviewed the entire patch set (often I want to read the
whole thing first before sending reviews, but in the interests of
saving time ...).

LGTM.