Move internal_{,v}warning to common/errors.[ch]

This commit moves internal_warning and internal_vwarning into
common/errors.[ch].

gdb/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* common/errors.h (internal_warning): New declaration.
	(internal_vwarning): Likewise.
	* common/errors.c (internal_warning): New function.
	* utils.h (internal_warning): Don't declare.
	(internal_vwarning): Likewise.
	* utils.c (internal_warning): Removed.

gdb/gdbserver/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* utils.c (internal_vwarning): New function.
Move cleanups.[ch] to common

This commit moves cleanups.[ch] into gdb/common/.  The only change to
the content of the files is that cleanups.c's include list was altered
to match its new location.

gdb/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* cleanups.h: Moved to...
	* common/cleanups.h: New file.
	* cleanups.c: Moved to...
	* common/cleanups.c: New file.
	* Makefile.in (SFILES): Replace cleanups.c with common/cleanups.c.
	(HFILES_NO_SRCDIR): Replace cleanups.h with common/cleanups.h.
	(cleanups.o): New rule.

gdb/gdbserver/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* Makefile.in (SFILES): Add common/cleanups.c.
	(OBS): cleanups.o.
	(cleanups.o): New rule.
Introduce common/gdb_setjmp.h

This commit creates a new file, common/gdb_setjmp.h, to hold some
portability macros for setjmp/longjmp et al. that are used by the
exceptions subsystem and by the demangler crash catcher.

gdb/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* common/gdb_setjmp.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_setjmp.h.
	* configure.ac: Move sigsetjmp check...
	* common/common.m4: ...here.
	* configure: Regenerate.
	* cp-support.c (SIGJMP_BUF): Undefine.
	(SIGSETJMP): Likewise.
	(SIGLONGJMP): Likewise.
	* exceptions.h (gdb_setjmp.h): Include.
	(setjmp.h): Do not include.
	(EXCEPTIONS_SIGJMP_BUF): Undefine.
	(EXCEPTIONS_SIGSETJMP): Likewise.
	(EXCEPTIONS_SIGLONGJMP): Likewise.
	Replace all uses of EXCEPTIONS_SIG* macros with SIG* macros
	from gdb_setjmp.h.
	* exceptions.c: Likewise.

gdb/gdbserver/
2014-08-14  Gary Benson  <gbenson@redhat.com>

	* config.in: Regenerate.
	* configure: Likewise.
Introduce common/common-exceptions.[ch]

This commit moves the exception throwing and catching code
into gdb/common/.  All exception printing code remains in
gdb/exceptions.[ch].
Use exceptions and cleanups in gdbserver

This commit replaces the hacky "exception" system in gdbserver with
the exceptions and cleanups subsystem from GDB.

Only the catch/cleanup code in what was "main" has been updated to
use the new system.  Other parts of gdbserver could likely be
converted to TRY_CATCH and cleanups too, but that can be done on an
as-needed basis if this patch is accepted.

A side-effect of this patch is that some error messages will change
slightly, and in cases with multiple errors the error messages will
be printed in a different order.