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 01/11 v5] Introduce common/errors.h


Gary Benson writes:
 > This introduces common/errors.h.  This holds some error- and
 > warning-related declarations that can be used by the code in common.
 > Clients of the "common" code must provide definitions for these
 > functions.
 > 
 > gdb/
 > 2014-08-01  Tom Tromey  <tromey@redhat.com>
 > 	    Gary Benson  <gbenson@redhat.com>
 > 
 > 	* common/errors.h: New file.
 > 	* common/errors.c: Likewise.
 > 	* Makefile.in (HFILES_NO_SRCDIR): Add common/errors.h.
 > 	(COMMON_OBS): Add errors.o.
 > 	(errors.o): New rule.
 > 	* common/common-defs.h: Include errors.h.
 > 	* utils.h (perror_with_name, error, verror, warning, vwarning):
 > 	Don't declare.
 > 	* common/common-utils.h: (malloc_failure, internal_error):
 > 	Likewise.
 > 
 > gdb/gdbserver/
 > 2014-08-01  Tom Tromey  <tromey@redhat.com>
 > 	    Gary Benson  <gbenson@redhat.com>
 > 
 > 	* Makefile.in (SFILES): Add common/errors.c.
 > 	(OBS): Add errors.o.
 > 	(IPA_OBS): Add errors-ipa.o.
 > 	(errors.o): New rule.
 > 	(errors-ipa.o): Likewise.
 > 	* utils.h (perror_with_name, error, warning): Don't declare.
 > 	* utils.c (warning): Renamed and rewritten as...
 > 	(vwarning): New function.
 > 	(error): Renamed and rewritten as...
 > 	(verror): New function.
 > 	(internal_error): Renamed and rewritten as...
 > 	(internal_verror): New function.
 > [...]
 > diff --git a/gdb/common/errors.c b/gdb/common/errors.c
 > new file mode 100644
 > index 0000000..7d0bb6e
 > --- /dev/null
 > +++ b/gdb/common/errors.c
 > @@ -0,0 +1,61 @@
 > +/* Error reporting facilities.
 > +
 > +   Copyright (C) 1986-2014 Free Software Foundation, Inc.
 > +
 > +   This file is part of GDB.
 > +
 > +   This program is free software; you can redistribute it and/or modify
 > +   it under the terms of the GNU General Public License as published by
 > +   the Free Software Foundation; either version 3 of the License, or
 > +   (at your option) any later version.
 > +
 > +   This program is distributed in the hope that it will be useful,
 > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
 > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 > +   GNU General Public License for more details.
 > +
 > +   You should have received a copy of the GNU General Public License
 > +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 > +
 > +#ifdef GDBSERVER
 > +#include "server.h"
 > +#else
 > +#include "defs.h"
 > +#endif
 > +#include "errors.h"

Nit: The introductory email to this patch series didn't mention
this instance of #ifdef GDBSERVER.  Needed?


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