From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6456 invoked by alias); 15 Nov 2012 08:41:58 -0000 Received: (qmail 6448 invoked by uid 22791); 15 Nov 2012 08:41:56 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,MIME_QP_LONG_LINE,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 08:41:51 +0000 Received: from md13.u-strasbg.fr (md13.u-strasbg.fr [130.79.200.248]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF8fmvT006032 for ; Thu, 15 Nov 2012 09:41:48 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md13.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF8fmN1021593 for ; Thu, 15 Nov 2012 09:41:48 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF8flHr023324 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 15 Nov 2012 09:41:47 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFA] ARI fixes: move gdb_stat.h and gdb_wait.h to common subdirectory. Date: Thu, 15 Nov 2012 08:41:00 -0000 Message-ID: <007201cdc30d$0d6115f0$282341d0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0073_01CDC315.6F257DF0" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00392.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0073_01CDC315.6F257DF0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 1256 The following entry removes two more critical entries at top of http://sourceware.org/gdb/current/ari/test/ I know that Joel and Tom talked about using gnulib instead of our own headers, but this is out of my competence, thus I send a patch that is really a quick way to remove Critical entries from ARI web page. I hope that this patch can be checked in despite the idea of going towards a more intensive use of gnulib. Comments welcome, Pierre Muller as ARI maintainer. ChangeLog entry: 2012-11-14 Pierre Muller ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory. * gdb_stat.h: Delete. Moved to common directory. * common/gdb_stat.h: New file. * gdb_wait.h: Delete. Moved to common directory. * common/gdb_wait.h: New file. * Makefile.in (H_FILES_NO_SRC): Adapt to new header location. * contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h location. (stat.h rule): Adapt to new gdb_stat.h location. * common/linux-osdata.c: Include "gdb_stat.h" header instead of header. * common/linux-ptrace.c: Include "gdb_wait.h" header instead of header. ------=_NextPart_000_0073_01CDC315.6F257DF0 Content-Type: application/octet-stream; name="ARI-stat-wait.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ARI-stat-wait.patch" Content-length: 20286 projecttype:gdb=0A= revision:HEAD=0A= email:muller@ics.u-strasbg.fr=0A= =0A= 2012-11-14 Pierre Muller =0A= =0A= ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory.=0A= * gdb_stat.h: Delete. Moved to common directory.=0A= * common/gdb_stat.h: New file.=0A= * gdb_wait.h: Delete. Moved to common directory.=0A= * common/gdb_wait.h: New file.=0A= * Makefile.in (H_FILES_NO_SRC): Adapt to new header=0A= location.=0A= * contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h=0A= location.=0A= (stat.h rule): Adapt to new gdb_stat.h location.=0A= * common/linux-osdata.c: Include "gdb_stat.h" header instead of=0A= header.=0A= * common/linux-ptrace.c: Include "gdb_wait.h" header instead of=0A= header.=0A= =0A= Index: src/gdb/Makefile.in=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/Makefile.in,v=0A= retrieving revision 1.1216=0A= diff -u -p -r1.1216 Makefile.in=0A= --- src/gdb/Makefile.in 13 Sep 2012 14:35:16 -0000 1.1216=0A= +++ src/gdb/Makefile.in 14 Nov 2012 08:57:21 -0000=0A= @@ -781,7 +781,7 @@ gnulib/import/string.in.h gnulib/import/=0A= gnulib/import/stdint.in.h remote.h gdb.h sparc-nat.h \=0A= gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \= =0A= amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \=0A= -gdbarch.h bsd-uthread.h gdb_stat.h memory-map.h memrange.h \=0A= +gdbarch.h bsd-uthread.h common/gdb_stat.h memory-map.h memrange.h \=0A= mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \= =0A= ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \=0A= f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \= =0A= @@ -799,7 +799,7 @@ expression.h score-tdep.h gdb_select.h s=0A= call-cmds.h typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \=0A= mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \=0A= complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \=0A= -gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.= h \=0A= +common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glib= c-tdep.h \=0A= interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h \=0A= amd64-linux-tdep.h linespec.h i387-tdep.h mn10300-tdep.h \=0A= sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h solib-pa64.h \=0A= Index: src/gdb/gdb_stat.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: gdb_stat.h=0A= diff -N gdb_stat.h=0A= --- src/gdb/gdb_stat.h 4 Jan 2012 08:17:02 -0000 1.10=0A= +++ /dev/null 1 Jan 1970 00:00:00 -0000=0A= @@ -1,72 +0,0 @@=0A= -/* Portable =0A= - Copyright (C) 1995, 2007-2012 Free Software Foundation, Inc.=0A= -=0A= - This file is part of GDB.=0A= -=0A= - This program is free software; you can redistribute it and/or modify=0A= - it under the terms of the GNU General Public License as published by=0A= - the Free Software Foundation; either version 3 of the License, or=0A= - (at your option) any later version.=0A= -=0A= - This program is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= - GNU General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU General Public License=0A= - along with this program. If not, see . = */=0A= -=0A= -#if !defined(GDB_STAT_H)=0A= -#define GDB_STAT_H=0A= -=0A= -#include =0A= -#include =0A= -=0A= -#ifdef STAT_MACROS_BROKEN=0A= -#undef S_ISBLK=0A= -#undef S_ISCHR=0A= -#undef S_ISDIR=0A= -#undef S_ISREG=0A= -#undef S_ISFIFO=0A= -#undef S_ISLNK=0A= -#undef S_ISSOCK=0A= -#undef S_ISMPB=0A= -#undef S_ISMPC=0A= -#undef S_ISNWK=0A= -#endif=0A= -=0A= -#if !defined(S_ISBLK) && defined(S_IFBLK)=0A= -#define S_ISBLK(m) (((m) & S_IFMT) =3D=3D S_IFBLK)=0A= -#endif=0A= -#if !defined(S_ISCHR) && defined(S_IFCHR)=0A= -#define S_ISCHR(m) (((m) & S_IFMT) =3D=3D S_IFCHR)=0A= -#endif=0A= -#if !defined(S_ISDIR) && defined(S_IFDIR)=0A= -#define S_ISDIR(m) (((m) & S_IFMT) =3D=3D S_IFDIR)=0A= -#endif=0A= -#if !defined(S_ISREG) && defined(S_IFREG)=0A= -#define S_ISREG(m) (((m) & S_IFMT) =3D=3D S_IFREG)=0A= -#endif=0A= -#if !defined(S_ISFIFO) && defined(S_IFIFO)=0A= -#define S_ISFIFO(m) (((m) & S_IFMT) =3D=3D S_IFIFO)=0A= -#endif=0A= -#if !defined(S_ISLNK) && defined(S_IFLNK)=0A= -#define S_ISLNK(m) (((m) & S_IFMT) =3D=3D S_IFLNK)=0A= -#endif=0A= -#if !defined(S_ISSOCK) && defined(S_IFSOCK)=0A= -#define S_ISSOCK(m) (((m) & S_IFMT) =3D=3D S_IFSOCK)=0A= -#endif=0A= -#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */=0A= -#define S_ISMPB(m) (((m) & S_IFMT) =3D=3D S_IFMPB)=0A= -#define S_ISMPC(m) (((m) & S_IFMT) =3D=3D S_IFMPC)=0A= -#endif=0A= -#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */=0A= -#define S_ISNWK(m) (((m) & S_IFMT) =3D=3D S_IFNWK)=0A= -#endif=0A= -=0A= -/* Microsoft C's stat.h doesn't define all the POSIX file modes. */=0A= -#ifndef S_IROTH=0A= -#define S_IROTH S_IREAD=0A= -#endif=0A= -=0A= -#endif /* !defined(GDB_STAT_H) */=0A= Index: src/gdb/gdb_wait.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: gdb_wait.h=0A= diff -N gdb_wait.h=0A= --- src/gdb/gdb_wait.h 4 Jan 2012 08:17:02 -0000 1.14=0A= +++ /dev/null 1 Jan 1970 00:00:00 -0000=0A= @@ -1,113 +0,0 @@=0A= -/* Standard wait macros.=0A= - Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc.=0A= -=0A= - This file is part of GDB.=0A= -=0A= - This program is free software; you can redistribute it and/or modify=0A= - it under the terms of the GNU General Public License as published by=0A= - the Free Software Foundation; either version 3 of the License, or=0A= - (at your option) any later version.=0A= -=0A= - This program is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= - GNU General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU General Public License=0A= - along with this program. If not, see . = */=0A= -=0A= -#ifndef GDB_WAIT_H=0A= -#define GDB_WAIT_H=0A= -=0A= -#ifdef HAVE_SYS_WAIT_H=0A= -#include /* POSIX */=0A= -#else=0A= -#ifdef HAVE_WAIT_H=0A= -#include /* legacy */=0A= -#endif=0A= -#endif=0A= -=0A= -/* Define how to access the int that the wait system call stores.=0A= - This has been compatible in all Unix systems since time immemorial,=0A= - but various well-meaning people have defined various different=0A= - words for the same old bits in the same old int (sometimes claimed=0A= - to be a struct). We just know it's an int and we use these macros=0A= - to access the bits. */=0A= -=0A= -/* The following macros are defined equivalently to their definitions=0A= - in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1=0A= - defines, since our code does not use waitpid() (but=0A= - NOTE exception for GNU/Linux below). We also fail to declare=0A= - wait() and waitpid(). */=0A= -=0A= -#ifndef WIFEXITED=0A= -#define WIFEXITED(w) (((w)&0377) =3D=3D 0)=0A= -#endif=0A= -=0A= -#ifndef WIFSIGNALED=0A= -#define WIFSIGNALED(w) (((w)&0377) !=3D 0177 && ((w)&~0377) =3D=3D 0)=0A= -#endif=0A= -=0A= -#ifndef WIFSTOPPED=0A= -#ifdef IBM6000=0A= -=0A= -/* Unfortunately, the above comment (about being compatible in all Unix=20= =0A= - systems) is not quite correct for AIX, sigh. And AIX 3.2 can generate= =0A= - status words like 0x57c (sigtrap received after load), and gdb would=0A= - choke on it. */=0A= -=0A= -#define WIFSTOPPED(w) ((w)&0x40)=0A= -=0A= -#else=0A= -#define WIFSTOPPED(w) (((w)&0377) =3D=3D 0177)=0A= -#endif=0A= -#endif=0A= -=0A= -#ifndef WEXITSTATUS=0A= -#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */=0A= -#endif=0A= -=0A= -#ifndef WTERMSIG=0A= -#define WTERMSIG(w) ((w) & 0177)=0A= -#endif=0A= -=0A= -#ifndef WSTOPSIG=0A= -#define WSTOPSIG WEXITSTATUS=0A= -#endif=0A= -=0A= -/* These are not defined in POSIX, but are used by our programs. */=0A= -=0A= -#ifndef WSETEXIT=0A= -# ifdef W_EXITCODE=0A= -#define WSETEXIT(w,status) ((w) =3D W_EXITCODE(status,0))=0A= -# else=0A= -#define WSETEXIT(w,status) ((w) =3D (0 | ((status) << 8)))=0A= -# endif=0A= -#endif=0A= -=0A= -#ifndef WSETSTOP=0A= -# ifdef W_STOPCODE=0A= -#define WSETSTOP(w,sig) ((w) =3D W_STOPCODE(sig))=0A= -# else=0A= -#define WSETSTOP(w,sig) ((w) =3D (0177 | ((sig) << 8)))=0A= -# endif=0A= -#endif=0A= -=0A= -/* For native GNU/Linux we may use waitpid and the __WCLONE option.=0A= - It is of course dangerous not to use the REAL header file...=0A= - . */=0A= -=0A= -/* Bits in the third argument to `waitpid'. */=0A= -#ifndef WNOHANG=0A= -#define WNOHANG 1 /* Don't block waiting. */=0A= -#endif=0A= -=0A= -#ifndef WUNTRACED=0A= -#define WUNTRACED 2 /* Report status of stopped children. */=0A= -#endif=0A= -=0A= -#ifndef __WCLONE=0A= -#define __WCLONE 0x80000000 /* Wait for cloned process. */=0A= -#endif=0A= -=0A= -#endif=0A= Index: src/gdb/contrib/ari/gdb_ari.sh=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/contrib/ari/gdb_ari.sh,v=0A= retrieving revision 1.4=0A= diff -u -p -r1.4 gdb_ari.sh=0A= --- src/gdb/contrib/ari/gdb_ari.sh 8 Nov 2012 09:04:27 -0000 1.4=0A= +++ src/gdb/contrib/ari/gdb_ari.sh 14 Nov 2012 08:57:22 -0000=0A= @@ -358,7 +358,7 @@ Do not include gnu-regex.h, instead incl=0A= BEGIN { doc["stat.h"] =3D "\=0A= Do not include stat.h or sys/stat.h, instead include gdb_stat.h"=0A= category["stat.h"] =3D ari_regression=0A= - fix("stat.h", "gdb/gdb_stat.h", 1)=0A= + fix("stat.h", "common/gdb_stat.h", 1)=0A= }=0A= /^#[[:space:]]*include[[:space:]]*.stat\.h./ \=0A= || /^#[[:space:]]*include[[:space:]]*.sys\/stat\.h./ {=0A= @@ -367,7 +367,7 @@ Do not include stat.h or sys/stat.h, ins=0A= =20=0A= BEGIN { doc["wait.h"] =3D "\=0A= Do not include wait.h or sys/wait.h, instead include gdb_wait.h"=0A= - fix("wait.h", "gdb/gdb_wait.h", 2);=0A= + fix("wait.h", "common/gdb_wait.h", 2);=0A= category["wait.h"] =3D ari_regression=0A= }=0A= /^#[[:space:]]*include[[:space:]]*.wait\.h./ \=0A= Index: src/gdb/common/gdb_stat.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: common/gdb_stat.h=0A= diff -N common/gdb_stat.h=0A= --- /dev/null 1 Jan 1970 00:00:00 -0000=0A= +++ src/gdb/common/gdb_stat.h 14 Nov 2012 08:57:22 -0000=0A= @@ -0,0 +1,72 @@=0A= +/* Portable =0A= + Copyright (C) 1995, 2007-2012 Free Software Foundation, Inc.=0A= +=0A= + This file is part of GDB.=0A= +=0A= + This program is free software; you can redistribute it and/or modify=0A= + it under the terms of the GNU General Public License as published by=0A= + the Free Software Foundation; either version 3 of the License, or=0A= + (at your option) any later version.=0A= +=0A= + This program is distributed in the hope that it will be useful,=0A= + but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= + GNU General Public License for more details.=0A= +=0A= + You should have received a copy of the GNU General Public License=0A= + along with this program. If not, see . = */=0A= +=0A= +#if !defined(GDB_STAT_H)=0A= +#define GDB_STAT_H=0A= +=0A= +#include =0A= +#include =0A= +=0A= +#ifdef STAT_MACROS_BROKEN=0A= +#undef S_ISBLK=0A= +#undef S_ISCHR=0A= +#undef S_ISDIR=0A= +#undef S_ISREG=0A= +#undef S_ISFIFO=0A= +#undef S_ISLNK=0A= +#undef S_ISSOCK=0A= +#undef S_ISMPB=0A= +#undef S_ISMPC=0A= +#undef S_ISNWK=0A= +#endif=0A= +=0A= +#if !defined(S_ISBLK) && defined(S_IFBLK)=0A= +#define S_ISBLK(m) (((m) & S_IFMT) =3D=3D S_IFBLK)=0A= +#endif=0A= +#if !defined(S_ISCHR) && defined(S_IFCHR)=0A= +#define S_ISCHR(m) (((m) & S_IFMT) =3D=3D S_IFCHR)=0A= +#endif=0A= +#if !defined(S_ISDIR) && defined(S_IFDIR)=0A= +#define S_ISDIR(m) (((m) & S_IFMT) =3D=3D S_IFDIR)=0A= +#endif=0A= +#if !defined(S_ISREG) && defined(S_IFREG)=0A= +#define S_ISREG(m) (((m) & S_IFMT) =3D=3D S_IFREG)=0A= +#endif=0A= +#if !defined(S_ISFIFO) && defined(S_IFIFO)=0A= +#define S_ISFIFO(m) (((m) & S_IFMT) =3D=3D S_IFIFO)=0A= +#endif=0A= +#if !defined(S_ISLNK) && defined(S_IFLNK)=0A= +#define S_ISLNK(m) (((m) & S_IFMT) =3D=3D S_IFLNK)=0A= +#endif=0A= +#if !defined(S_ISSOCK) && defined(S_IFSOCK)=0A= +#define S_ISSOCK(m) (((m) & S_IFMT) =3D=3D S_IFSOCK)=0A= +#endif=0A= +#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */=0A= +#define S_ISMPB(m) (((m) & S_IFMT) =3D=3D S_IFMPB)=0A= +#define S_ISMPC(m) (((m) & S_IFMT) =3D=3D S_IFMPC)=0A= +#endif=0A= +#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */=0A= +#define S_ISNWK(m) (((m) & S_IFMT) =3D=3D S_IFNWK)=0A= +#endif=0A= +=0A= +/* Microsoft C's stat.h doesn't define all the POSIX file modes. */=0A= +#ifndef S_IROTH=0A= +#define S_IROTH S_IREAD=0A= +#endif=0A= +=0A= +#endif /* !defined(GDB_STAT_H) */=0A= Index: src/gdb/common/gdb_wait.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: common/gdb_wait.h=0A= diff -N common/gdb_wait.h=0A= --- /dev/null 1 Jan 1970 00:00:00 -0000=0A= +++ src/gdb/common/gdb_wait.h 14 Nov 2012 08:57:22 -0000=0A= @@ -0,0 +1,113 @@=0A= +/* Standard wait macros.=0A= + Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc.=0A= +=0A= + This file is part of GDB.=0A= +=0A= + This program is free software; you can redistribute it and/or modify=0A= + it under the terms of the GNU General Public License as published by=0A= + the Free Software Foundation; either version 3 of the License, or=0A= + (at your option) any later version.=0A= +=0A= + This program is distributed in the hope that it will be useful,=0A= + but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= + GNU General Public License for more details.=0A= +=0A= + You should have received a copy of the GNU General Public License=0A= + along with this program. If not, see . = */=0A= +=0A= +#ifndef GDB_WAIT_H=0A= +#define GDB_WAIT_H=0A= +=0A= +#ifdef HAVE_SYS_WAIT_H=0A= +#include /* POSIX */=0A= +#else=0A= +#ifdef HAVE_WAIT_H=0A= +#include /* legacy */=0A= +#endif=0A= +#endif=0A= +=0A= +/* Define how to access the int that the wait system call stores.=0A= + This has been compatible in all Unix systems since time immemorial,=0A= + but various well-meaning people have defined various different=0A= + words for the same old bits in the same old int (sometimes claimed=0A= + to be a struct). We just know it's an int and we use these macros=0A= + to access the bits. */=0A= +=0A= +/* The following macros are defined equivalently to their definitions=0A= + in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1=0A= + defines, since our code does not use waitpid() (but=0A= + NOTE exception for GNU/Linux below). We also fail to declare=0A= + wait() and waitpid(). */=0A= +=0A= +#ifndef WIFEXITED=0A= +#define WIFEXITED(w) (((w)&0377) =3D=3D 0)=0A= +#endif=0A= +=0A= +#ifndef WIFSIGNALED=0A= +#define WIFSIGNALED(w) (((w)&0377) !=3D 0177 && ((w)&~0377) =3D=3D 0)=0A= +#endif=0A= +=0A= +#ifndef WIFSTOPPED=0A= +#ifdef IBM6000=0A= +=0A= +/* Unfortunately, the above comment (about being compatible in all Unix=20= =0A= + systems) is not quite correct for AIX, sigh. And AIX 3.2 can generate= =0A= + status words like 0x57c (sigtrap received after load), and gdb would=0A= + choke on it. */=0A= +=0A= +#define WIFSTOPPED(w) ((w)&0x40)=0A= +=0A= +#else=0A= +#define WIFSTOPPED(w) (((w)&0377) =3D=3D 0177)=0A= +#endif=0A= +#endif=0A= +=0A= +#ifndef WEXITSTATUS=0A= +#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */=0A= +#endif=0A= +=0A= +#ifndef WTERMSIG=0A= +#define WTERMSIG(w) ((w) & 0177)=0A= +#endif=0A= +=0A= +#ifndef WSTOPSIG=0A= +#define WSTOPSIG WEXITSTATUS=0A= +#endif=0A= +=0A= +/* These are not defined in POSIX, but are used by our programs. */=0A= +=0A= +#ifndef WSETEXIT=0A= +# ifdef W_EXITCODE=0A= +#define WSETEXIT(w,status) ((w) =3D W_EXITCODE(status,0))=0A= +# else=0A= +#define WSETEXIT(w,status) ((w) =3D (0 | ((status) << 8)))=0A= +# endif=0A= +#endif=0A= +=0A= +#ifndef WSETSTOP=0A= +# ifdef W_STOPCODE=0A= +#define WSETSTOP(w,sig) ((w) =3D W_STOPCODE(sig))=0A= +# else=0A= +#define WSETSTOP(w,sig) ((w) =3D (0177 | ((sig) << 8)))=0A= +# endif=0A= +#endif=0A= +=0A= +/* For native GNU/Linux we may use waitpid and the __WCLONE option.=0A= + It is of course dangerous not to use the REAL header file...=0A= + . */=0A= +=0A= +/* Bits in the third argument to `waitpid'. */=0A= +#ifndef WNOHANG=0A= +#define WNOHANG 1 /* Don't block waiting. */=0A= +#endif=0A= +=0A= +#ifndef WUNTRACED=0A= +#define WUNTRACED 2 /* Report status of stopped children. */=0A= +#endif=0A= +=0A= +#ifndef __WCLONE=0A= +#define __WCLONE 0x80000000 /* Wait for cloned process. */=0A= +#endif=0A= +=0A= +#endif=0A= Index: src/gdb/common/linux-osdata.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/common/linux-osdata.c,v=0A= retrieving revision 1.7=0A= diff -u -p -r1.7 linux-osdata.c=0A= --- src/gdb/common/linux-osdata.c 7 Nov 2012 12:35:04 -0000 1.7=0A= +++ src/gdb/common/linux-osdata.c 14 Nov 2012 08:57:22 -0000=0A= @@ -26,7 +26,6 @@=0A= #include "linux-osdata.h"=0A= =20=0A= #include =0A= -#include =0A= #include =0A= #include =0A= #include =0A= @@ -43,6 +42,7 @@=0A= #include "buffer.h"=0A= #include "gdb_assert.h"=0A= #include "gdb_dirent.h"=0A= +#include "gdb_stat.h"=0A= =20=0A= /* Define PID_T to be a fixed size that is at least as large as pid_t,=0A= so that reading pid values embedded in /proc works=0A= Index: src/gdb/common/linux-ptrace.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/common/linux-ptrace.c,v=0A= retrieving revision 1.4=0A= diff -u -p -r1.4 linux-ptrace.c=0A= --- src/gdb/common/linux-ptrace.c 17 Sep 2012 18:27:58 -0000 1.4=0A= +++ src/gdb/common/linux-ptrace.c 14 Nov 2012 08:57:22 -0000=0A= @@ -27,6 +27,7 @@=0A= #include "linux-procfs.h"=0A= #include "buffer.h"=0A= #include "gdb_assert.h"=0A= +#include "gdb_wait.h"=0A= =20=0A= /* Find all possible reasons we could fail to attach PID and append these= =0A= newline terminated reason strings to initialized BUFFER. '\0' terminat= ion=0A= @@ -57,7 +58,6 @@ extern void (linux_ptrace_test_ret_to_nx=0A= #include =0A= #include =0A= #include =0A= -#include =0A= #include =0A= =20=0A= #endif /* defined __i386__ || defined __x86_64__ */=0A= ------=_NextPart_000_0073_01CDC315.6F257DF0--