Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/9][gdbserver] Split server.h.
Date: Tue, 03 Sep 2013 20:26:00 -0000	[thread overview]
Message-ID: <1378239999-15533-1-git-send-email-palves@redhat.com> (raw)

The recurring theme of doing:

 #ifdef GDBSERVER
 #include "server.h"
 #else
 #include "defs.h"
 #endif

in common/ code is a bit annoying.  I think we'll end up proving a
defs.h in gdbserver, and we'll want to share as much with gdb's as
possible.

I considered just renaming server.h to defs.h, but looking at
server.h, I think it's better to first split out things that don't
really need to be there.  Now that gdbserver's Makefile does automatic
dependency tracking, it's easy enough to split the parts that actually
define interfaces of specific modules to their own files.  This series
does that.  Some of the new headers remain included in server.h (at
least for now), for they define things that are truly used throughout
the code, and I was hating the fact that I was ending up adding
#include remote-utils.h throughout in a previous attempt, with "utils"
being yet another kitchensink, which I prefer avoiding.  Still, I
think it still makes things clearer this way.

I think we should do the same on the gdb side too.

Tested on x86_64 Fedora 17.  I'll apply it tomorrow, barring comments.

Pedro Alves (9):
  [gdbserver] Delete _ macro (gettext).
  [gdbserver] Split a new remote-utils.h file out of server.h.
  [gdbserver] Split a new utils.h file out of server.h.
  [gdbserver] Split a new tracepoint.h file out of server.h.
  [gdbserver] Split a new ax.h file out of server.h.
  [gdbserver] Split a new inferiors.h file out of server.h.
  [gdbserver] Split a new dll.h file out of server.h.
  [gdbserver] Split a new event-loop.h file out of server.h.
  [gdbserver] Split a new hostio.h file out of server.h.

 gdb/gdbserver/ax.c            |   1 +
 gdb/gdbserver/ax.h            |  57 +++++++
 gdb/gdbserver/dll.c           |   1 +
 gdb/gdbserver/dll.h           |  35 ++++
 gdb/gdbserver/event-loop.h    |  36 ++++
 gdb/gdbserver/gdbthread.h     |   1 +
 gdb/gdbserver/hostio.c        |   1 +
 gdb/gdbserver/hostio.h        |  28 +++
 gdb/gdbserver/inferiors.c     |   1 +
 gdb/gdbserver/inferiors.h     | 114 +++++++++++++
 gdb/gdbserver/linux-low.c     |   2 +
 gdb/gdbserver/linux-x86-low.c |   2 +
 gdb/gdbserver/remote-utils.c  |   2 +
 gdb/gdbserver/remote-utils.h  |  85 ++++++++++
 gdb/gdbserver/server.c        |   3 +
 gdb/gdbserver/server.h        | 385 +-----------------------------------------
 gdb/gdbserver/target.c        |   1 +
 gdb/gdbserver/target.h        |   1 +
 gdb/gdbserver/tracepoint.c    |   1 +
 gdb/gdbserver/tracepoint.h    | 132 +++++++++++++++
 gdb/gdbserver/utils.h         |  32 ++++
 21 files changed, 541 insertions(+), 380 deletions(-)
 create mode 100644 gdb/gdbserver/dll.h
 create mode 100644 gdb/gdbserver/event-loop.h
 create mode 100644 gdb/gdbserver/hostio.h
 create mode 100644 gdb/gdbserver/inferiors.h
 create mode 100644 gdb/gdbserver/remote-utils.h
 create mode 100644 gdb/gdbserver/tracepoint.h
 create mode 100644 gdb/gdbserver/utils.h

-- 
1.7.11.7


             reply	other threads:[~2013-09-03 20:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 20:26 Pedro Alves [this message]
2013-09-03 20:26 ` [PATCH 8/9] [gdbserver] Split a new event-loop.h file out of server.h Pedro Alves
2013-09-03 20:26 ` [PATCH 2/9] [gdbserver] Split a new remote-utils.h " Pedro Alves
2013-09-03 20:26 ` [PATCH 5/9] [gdbserver] Split a new ax.h " Pedro Alves
2013-09-05 20:49   ` [PATCH 5/9] [gdbserver] Move bytecode compilation bits from server.h to ax.h. (was: Re: [PATCH 5/9] [gdbserver] Split a new ax.h file out of server.h.) Pedro Alves
2013-09-03 20:26 ` [PATCH 1/9] [gdbserver] Delete _ macro (gettext) Pedro Alves
2013-09-03 20:26 ` [PATCH 7/9] [gdbserver] Split a new dll.h file out of server.h Pedro Alves
2013-09-05 20:50   ` Pedro Alves
2013-09-03 20:26 ` [PATCH 9/9] [gdbserver] Split a new hostio.h " Pedro Alves
2013-09-05 20:50   ` Pedro Alves
2013-09-03 20:26 ` [PATCH 4/9] [gdbserver] Split a new tracepoint.h " Pedro Alves
2013-09-03 20:26 ` [PATCH 3/9] [gdbserver] Split a new utils.h " Pedro Alves
2013-09-03 20:54 ` [PATCH 6/9] [gdbserver] Split a new inferiors.h " Pedro Alves
2013-09-05 20:47 ` [COMMIT] Re: [PATCH 0/9][gdbserver] Split server.h Pedro Alves
2013-09-05 22:22   ` Pedro Alves
2013-09-05 23:52     ` Joel Brobecker
2013-09-06  5:47     ` Eli Zaretskii
2013-09-06  6:51       ` Ricard Wanderlof
2013-09-06  7:42         ` Eli Zaretskii
2013-09-06  9:36       ` Pedro Alves
2013-09-06 10:05         ` Agovic, Sanimir
2013-09-06 10:09           ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378239999-15533-1-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox