From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, Pedro Alves <palves@redhat.com>
Subject: [PATCH 7/7 v2] Tidy #include lists
Date: Fri, 27 Jun 2014 14:52:00 -0000 [thread overview]
Message-ID: <1403878351-22974-8-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <1403878351-22974-1-git-send-email-gbenson@redhat.com>
This commit tidies up the #include lists in {i386,amd64}-linux-nat.c,
removing headers that are no longer required and reordering some lines
so that both files roughly match. Additionally, an unused definition
was removed from the middle of the #include list in i386-linux-nat.c.
This patch is unchanged from the original version in this series.
gdb/
2014-06-27 Gary Benson <gbenson@redhat.com>
* amd64-linux-nat.c (gdbcore.h): Removed include.
(regset.h): Likewise.
(nat/linux-btrace.h): Likewise.
(btrace.h): Likewise.
(gdb_assert.h): Likewise.
(string.h): Likewise.
(sys/uio.h): Likewise.
(sys/debugreg.h): Likewise.
(sys/syscall.h): Likewise.
(sys/procfs.h): Likewise.
(sys/user.h): Likewise.
(asm/ptrace.h): Likewise.
(i386-nat.h): Likewise.
* i386-linux-nat.c (i386-nat.h): Likewise.
(regset.h): Likewise.
(target.h): Likewise.
(linux-nat.h): Likewise.
(nat/linux-btrace.h): Likewise.
(btrace.h): Likewise.
(gdb_assert.h): Likewise.
(string.h): Likewise.
(sys/uio.h): Likewise.
(sys/user.h): Likewise.
(sys/procfs.h): Likewise.
(sys/reg.h): Likewise.
(sys/debugreg.h): Likewise.
(ORIG_EAX): Removed definition.
---
gdb/ChangeLog | 30 ++++++++++++++++++++++++++++++
gdb/amd64-linux-nat.c | 32 +++++---------------------------
gdb/i386-linux-nat.c | 33 +++------------------------------
3 files changed, 38 insertions(+), 57 deletions(-)
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index bd03ea3..5ac09c6 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -20,42 +20,20 @@
#include "defs.h"
#include "inferior.h"
-#include "gdbcore.h"
#include "regcache.h"
-#include "regset.h"
-#include "linux-nat.h"
-#include "amd64-linux-tdep.h"
-#include "nat/linux-btrace.h"
-#include "btrace.h"
-
-#include "gdb_assert.h"
-#include <string.h>
#include "elf/common.h"
-#include <sys/uio.h>
#include <sys/ptrace.h>
-#include <sys/debugreg.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <sys/user.h>
#include <asm/prctl.h>
-/* FIXME ezannoni-2003-07-09: we need <sys/reg.h> to be included after
- <asm/ptrace.h> because the latter redefines FS and GS for no apparent
- reason, and those definitions don't match the ones that libpthread_db
- uses, which come from <sys/reg.h>. */
-/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
- been removed from ptrace.h in the kernel. However, better safe than
- sorry. */
-#include <asm/ptrace.h>
#include <sys/reg.h>
-#include "gdb_proc_service.h"
-
-/* Prototypes for supply_gregset etc. */
#include "gregset.h"
+#include "gdb_proc_service.h"
+#include "amd64-nat.h"
+#include "linux-nat.h"
+#include "x86-linux-nat.h"
#include "amd64-tdep.h"
+#include "amd64-linux-tdep.h"
#include "i386-linux-tdep.h"
-#include "amd64-nat.h"
-#include "i386-nat.h"
#include "i386-xstate.h"
#include "x86-linux-nat.h"
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 3778c77..91c91a6 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -18,46 +18,19 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "i386-nat.h"
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
-#include "regset.h"
-#include "target.h"
-#include "linux-nat.h"
-#include "nat/linux-btrace.h"
-#include "btrace.h"
-
-#include "gdb_assert.h"
-#include <string.h>
#include "elf/common.h"
-#include <sys/uio.h>
#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <sys/procfs.h>
-
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
-#ifndef ORIG_EAX
-#define ORIG_EAX -1
-#endif
-
-#ifdef HAVE_SYS_DEBUGREG_H
-#include <sys/debugreg.h>
-#endif
-
-/* Prototypes for supply_gregset etc. */
#include "gregset.h"
+#include "gdb_proc_service.h"
+#include "x86-linux-nat.h"
+#include "i386-linux-nat.h"
#include "i387-tdep.h"
#include "i386-tdep.h"
#include "i386-linux-tdep.h"
-
-/* Defines ps_err_e, struct ps_prochandle. */
-#include "gdb_proc_service.h"
-
#include "i386-xstate.h"
#include "x86-linux-nat.h"
--
1.7.1
next prev parent reply other threads:[~2014-06-27 14:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 14:12 [PATCH 0/7 v2] Refactor shared code in {i386,amd64}-linux-nat.c Gary Benson
2014-06-27 14:12 ` [PATCH 3/7 v2] Merge ps_get_thread_area Gary Benson
2014-07-09 13:08 ` Pedro Alves
2014-07-09 13:08 ` Pedro Alves
2014-06-27 14:12 ` [PATCH 1/7 v2] Rename identical functions Gary Benson
2014-07-09 13:04 ` Pedro Alves
2014-06-27 14:12 ` [PATCH 2/7 v2] Merge {i386,amd64}_linux_read_description Gary Benson
2014-07-09 13:07 ` Pedro Alves
2014-06-27 14:28 ` [PATCH 6/7 v2] Move duplicated code into new files Gary Benson
2014-07-09 13:12 ` Pedro Alves
2014-06-27 14:40 ` [PATCH 5/7 v2] Comment and whitespace changes Gary Benson
2014-07-09 13:11 ` Pedro Alves
2014-06-27 14:52 ` Gary Benson [this message]
2014-07-09 13:13 ` [PATCH 7/7 v2] Tidy #include lists Pedro Alves
2014-08-06 9:36 ` Yao Qi
2014-08-06 10:19 ` Gary Benson
2014-08-06 11:16 ` Yao Qi
2014-09-09 15:09 ` [pushed] Fix missing "struct iovec" definition on some x86-linux. (was: "[PATCH 7/7 v2] Tidy #include lists") Joel Brobecker
2014-09-10 10:59 ` Gary Benson
2014-09-10 13:14 ` Joel Brobecker
2014-06-27 14:53 ` [PATCH 4/7 v2] Pull out common parts of _initialize_{i386,amd64}_linux_nat Gary Benson
2014-07-09 13:09 ` Pedro Alves
2014-07-09 13:17 ` [PATCH 0/7 v2] Refactor shared code in {i386,amd64}-linux-nat.c Pedro Alves
2014-07-11 12:34 ` Gary Benson
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=1403878351-22974-8-git-send-email-gbenson@redhat.com \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=palves@redhat.com \
/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