This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] s390-nat.c: Fix missing prototypes
Pedro Alves <palves@redhat.com> writes:
> Every other linux arch I looked at included <sys/procfs.h> before
> gregset.h instead (or gdb_proc_service.h, which pulls sys/procfs.h).
> Even core-regset.c does:
>
> #ifdef HAVE_SYS_PROCFS_H
> #include <sys/procfs.h>
> #endif
>
> /* Prototypes for supply_gregset etc. */
> #include "gregset.h"
> ...
>
> Are s390's headers different in this regard?
Including <sys/procfs.h> would work for s390 as well. Except for
pulling in some more declarations than <sys/ucontext.h>, there should be
no difference.
> 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.
-- Andreas