diff mbox

[13/15] Finally remove GDBSERVER (mostly) from agent.c

Message ID 1404902255-11101-14-git-send-email-gbenson@redhat.com
State Changes Requested, archived
Headers show

Commit Message

Gary Benson July 9, 2014, 10:37 a.m. UTC
This reduces the use of the GDBSERVER define in agent.c to deciding
which gnulib header to include.

gdb/
2014-07-09  Tom Tromey  <tromey@redhat.com>
	    Gary Benson  <gbenson@redhat.com>

	* common/agent.c: Don't include defs.h or server.h.
---
 gdb/ChangeLog      |    5 +++++
 gdb/common/agent.c |   19 ++++++++++++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)

Comments

Doug Evans July 14, 2014, 7:17 p.m. UTC | #1
Gary Benson writes:
 > This reduces the use of the GDBSERVER define in agent.c to deciding
 > which gnulib header to include.
 > 
 > gdb/
 > 2014-07-09  Tom Tromey  <tromey@redhat.com>
 > 	    Gary Benson  <gbenson@redhat.com>
 > 
 > 	* common/agent.c: Don't include defs.h or server.h.

LGTM.
Might want to expand on the changelog entry to be like 06/15(?).

E.g.,
	* common/buffer.c: Don't include server.h or defs.h; update
	includes.
diff mbox

Patch

diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index 798dd1d..0df4b19 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -17,15 +17,24 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
 #ifdef GDBSERVER
-#include "server.h"
+#include "build-gnulib-gdbserver/config.h"
 #else
-#include "defs.h"
-#include "target.h"
-#include "infrun.h"
-#include "objfiles.h"
+#include "build-gnulib/config.h"
 #endif
 
+#include <unistd.h>
+
+#include "ptid.h"
+#include "gdb_signals.h"
+#include "target/waitstatus.h"
+#include "common-types.h"
+#include "target/target.h"
+#include "target/symbol.h"
+#include "common-debug.h"
+
 #include <stdarg.h>
 #include <errno.h>