This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH 4/5 v7] Introduce common-debug.h


Doug Evans wrote:
> On Wed, Aug 13, 2014 at 2:56 AM, Gary Benson <gbenson@redhat.com> wrote:
> > This introduces common-debug.h.  This holds the functions
> > debug_printf and debug_vprintf, two functions that the common
> > code can use to print debugging messages.  Clients of the common
> > code are expected to implement debug_vprintf; a debug_vprintf
> > function is written from scratch for GDB, and gdbserver's
> > existing debug_printf is repurposed as debug_vprintf.
> >
> > common/agent.c is changed to use debug_vprintf rather than
> > defining the macro DEBUG_AGENT depending on GDBSERVER.
> >
> > nat/i386-dregs.c is changed to use the externally-implemented
> > debug_printf, rather than defining it itself.
> >
> > gdb/
> > 2014-08-13  Tom Tromey  <tromey@redhat.com>
> >             Gary Benson  <gbenson@redhat.com>
> >
> >         * common/common-debug.h: New file.
> >         * common/common-debug.c: Likewise.
> >         * debug.c: Likewise.
> >         * Makefile.in (SFILES): Add common/common-debug.c.
> >         (HFILES_NO_SRCDIR): Add common/common-debug.h.
> >         (COMMON_OBS): Add common-debug.o and debug.o.
> >         (common-debug.o): New rule.
> >         * common/common-defs.h: Include common-debug.h.
> >         * common/agent.c (debug_agent_printf): New function.
> >         (DEBUG_AGENT): Redefine.
> >         * nat/i386-dregs.c (debug_printf): Undefine.
> >
> > gdb/gdbserver/
> > 2014-08-13  Tom Tromey  <tromey@redhat.com>
> >             Gary Benson  <gbenson@redhat.com>
> >
> >         * Makefile.in (SFILES): Add common/common-debug.c.
> >         (OBS): Add common-debug.o.
> >         (common-debug.o): New rule.
> >         * debug.h (debug_printf): Don't declare.
> >         * debug.c (debug_printf): Renamed and rewritten as...
> >         (debug_vprintf): New function.
> 
> LGTM

I've pushed this series up to here.  Thanks for reviewing this Doug.

Cheers,
Gary

-- 
http://gbenson.net/


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