Introduce common/errors.h

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-07-08  Tom Tromey  <tromey@redhat.com>
	    Gary Benson  <gbenson@redhat.com>

	* common/errors.h: New file.
	* utils.h: Include errors.h.
	(perror_with_name, error, fatal, warning): Don't declare.
	* common/common-utils.h: Include errors.h.
	(malloc_failure, internal_error): Don't declare.

gdb/gdbserver/
2014-06-18  Tom Tromey  <tromey@redhat.com>

	* utils.h: Include errors.h.
	(perror_with_name, error, fatal, warning): Don't declare.
remove some GDBSERVER checks from linux-ptrace

This patch removes some GDBSERVER checks from common/linux-ptrace.c.
Currently the code uses a compile-time check to decide whether some
flags should be used.  This changes the code to instead let users of
the module specify an additional set of flags; and then changes gdb's
linux-nat.c to call this function.  At some later date, when the back
ends are fully merged, we will be able to remove this function again.
Make gdbserver CORE_ADDR unsigned

gdbserver defines CORE_ADDR to be signed.  This seems erroneous to
me; and furthermore likely to cause problems in common/, as it is
different from gdb's definition.

gdb/gdbserver/
2014-06-18  Tom Tromey  <tromey@redhat.com>

	* defs.h (CORE_ADDR): Now unsigned.
introduce common-types.h

This introduces common-types.h.  This file defines various standard
types used by gdb and gdbserver.

Currently these types are conditionally defined based on GDBSERVER.
The long term goal is to remove all such tests; however, this is
difficult as currently gdb uses definitions from BFD.  In the meantime
this is still a step in the right direction.
remove simple GDBSERVER uses from common

This removes various simple GDBSERVER uses from common.  The simple
uses are just cases where the code includes defs.h or server.h
depending on GDBSERVER.  Instead, now the files include the headers
that they require.  Unfortunately for the time being we still need to
check GDBSERVER to decide which gnulib config header to import; but
this is not very significant in the long run.
introduce and use debug_vprintf

This introduces debug_vprintf, a function that clients of "common" are
expected to implement.  Then it changes common/agent.c to use this
function rather than redefine DEBUG_AGENT depending on GDBSERVER.

gdb/
2014-01-09  Tom Tromey  <tromey@redhat.com>

	* utils.c (debug_vprintf): New function.
	* common/agent.c (debug_agent_print): New function.
	(DEBUG_AGENT): Redefine.
	* common/errors.h (debug_vprintf): Define.

gdb/gdbserver/
2014-01-09  Tom Tromey  <tromey@redhat.com>

	* utils.c (debug_vprintf): Define.
remove GDBSERVER use from common/linux-ptrace.c

This mostly removes the use of defs.h and server.h from
common/linux-ptrace.c.  A use must remain for the gnulib header for
the time being.
make btrace-common.h not use GDBSERVER

This changes btrace-common.h not to include defs.h or server.h.
Instead it moves the defs.h include to btrace.c.
add target/target.h

This adds target/target.h.  This file declares some functions that the
"common" code can use and that the clients must implement.  It also
changes code in common to use these functions.
more target unification

This unifies a few more top-level target functions -- target_resume,
target_wait, and target_stop -- and the declaration of the variable
"non_stop".  This follows the usual pattern, where clients of "common"
are expected to define the objects appropriately, thus simplifying
common/agent.c a bit more.
add target/symbol.h, update users

This adds a new "target/symbol.h" file, that declares a symbol-lookup
function used by code in common.  It follows the usual pattern, where
clients of "common" have their own definitions of this function.  This
simplifies agent.c a bit.
finally remove GDBSERVER (mostly) from agent.c

This reduces the use of the GDBSERVER define in agent.c to deciding
which gnulib header to include.
introduce common_get_thread_regcache

This introduces common_get_thread_regcache so that we can simplify
common/linux-btrace.c.  A better long term solution would be unify the
regcache code, but this suffices for my current purposes.
finally remove GDBSERVER (mostly) from linux-btrace.c

This applies the usual GDBSERVER treatment to linux-btrace.c.
Now it is used only to find the gnulib header.