Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] s390-nat.c: Fix missing prototypes
Date: Tue, 06 Mar 2012 11:52:00 -0000	[thread overview]
Message-ID: <4F55FA6F.2090203@redhat.com> (raw)
In-Reply-To: <8762eigdxh.fsf@linux.vnet.ibm.com>

On 03/06/2012 11:35 AM, Andreas Arnez wrote:

>> I think we should consider putting
>>
>> #ifdef HAVE_SYS_PROCFS_H
>> #include <sys/procfs.h>
>> #endif
>>
>> in gregset.h itself.
> 
> Right, that sounds OK.  Then Joel's commit for s390-nat.c could be left
> as is.


Builds fine on x64-64 Fedora, even when I move the gregset.h include in
amd64-linux-nat.c to the top, right below defs.h, like:

--- c/gdb/amd64-linux-nat.c
+++ w/gdb/amd64-linux-nat.c
@@ -19,6 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

 #include "defs.h"
+#include "gregset.h"
 #include "inferior.h"
 #include "gdbcore.h"
 #include "regcache.h"
@@ -46,9 +47,6 @@
 #include <sys/reg.h>
 #include "gdb_proc_service.h"

-/* Prototypes for supply_gregset etc.  */
-#include "gregset.h"
-
 #include "amd64-tdep.h"
 #include "i386-linux-tdep.h"
 #include "amd64-nat.h"

(which fails to build without the patch below)

Comments, anyone?

2012-03-06  Pedro Alves  <palves@redhat.com>

	* gregset.h [HAVE_SYS_PROCFS_H]: Include <sys/procfs.h>.

---

 gdb/gregset.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gdb/gregset.h b/gdb/gregset.h
index 4f34788..d73b5b8 100644
--- a/gdb/gregset.h
+++ b/gdb/gregset.h
@@ -19,6 +19,10 @@
 #ifndef GREGSET_H
 #define GREGSET_H

+#ifdef HAVE_SYS_PROCFS_H
+#include <sys/procfs.h>
+#endif
+
 #ifndef GDB_GREGSET_T
 #define GDB_GREGSET_T gregset_t
 #endif


  reply	other threads:[~2012-03-06 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 17:39 Andreas Arnez
2012-03-05 19:07 ` Joel Brobecker
2012-03-06  9:49   ` Andreas Arnez
2012-03-06 10:26     ` Pedro Alves
2012-03-06 11:35       ` Andreas Arnez
2012-03-06 11:52         ` Pedro Alves [this message]
2012-03-06 12:15           ` Andreas Arnez
2012-03-06 16:30             ` Joel Brobecker
2012-03-06 17:18               ` 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=4F55FA6F.2090203@redhat.com \
    --to=palves@redhat.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=brobecker@adacore.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