Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFC] ARI fix: Replace sys/wait.h by gdb_wait.h in linux-fork.c
Date: Fri, 05 Oct 2007 07:42:00 -0000	[thread overview]
Message-ID: <005e01c80723$4ae0dec0$e0a29c40$@u-strasbg.fr> (raw)

  - This is a RFC and not a RFA for several reasons:
1) I have no access to a linux machine, and even building
a gdb with linux target does not include that source.
So someone should test and tell me if the
patch is without regressions.

2) Are there rules about the order in which
the different headers are listed?
  You need to remember that I am
mainly a pascal programmer. In pascal language,
exchanging the order in the USES clause,
can leads to the fact that another function
is used in the source if the same function
is declared in the two included units.
  As this is not allowed in C, I suppose that this is
not relevant, but with all that macros that get defined
when parsing the headers, I am still not sure it is really
safe to put the headers in a random order.

  I did put the gdb_wait.h together with other local
headers, which seems to be a common practice in GDB sources.
Is this part of coding style, or something more profound?

3) I also updated the dependency of linux-fork.o in
Makefile.in, but stumbled on the same problem:
is there some preferred ordering of the dependency list?
I did not see something obvious  ...
Does it follow the declaration order in the source?



Pierre Muller,
trying to reduce ARIs...

ChangeLog entry:
2007-10-04  Pierre Muller  <muller@ics.u-strasbg.fr>

        * linux-fork.c: ARI fix: include "gdb_wait.h" instead of
<sys/wait.h>.
        Makefile.in (linux-fork.o): Add gdb_wait.h dependency.

$ cvs diff -up linux-fork.c Makefile.in
Index: linux-fork.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-fork.c,v
retrieving revision 1.12
diff -u -p -r1.12 linux-fork.c
--- linux-fork.c        23 Aug 2007 18:08:35 -0000      1.12
+++ linux-fork.c        5 Oct 2007 07:31:45 -0000
@@ -26,9 +26,9 @@
 #include "gdb_string.h"
 #include "linux-fork.h"
 #include "linux-nat.h"
+#include "gdb_wait.h"

 #include <sys/ptrace.h>
-#include <sys/wait.h>
 #include <sys/param.h>
 #include <dirent.h>
 #include <ctype.h>
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.939
diff -u -p -r1.939 Makefile.in
--- Makefile.in 27 Sep 2007 18:48:32 -0000      1.939
+++ Makefile.in 5 Oct 2007 07:31:46 -0000
@@ -2236,7 +2236,7 @@ linespec.o: linespec.c $(defs_h) $(symta
        $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
 linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h)
$(gdbcmd_h) \
        $(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
-       $(linux_nat_h)
+       $(linux_nat_h) $(gdb_wait_h)
 linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h)
$(gdb_string_h) \
        $(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \
        $(gdbcmd_h) $(regcache_h) $(regset_h) $(inf_ptrace_h) $(auxv_h) \



             reply	other threads:[~2007-10-05  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05  7:42 Pierre Muller [this message]
2007-10-05 20:02 ` Joel Brobecker
2007-10-08  7:44   ` Pierre Muller

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='005e01c80723$4ae0dec0$e0a29c40$@u-strasbg.fr' \
    --to=muller@ics.u-strasbg.fr \
    --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