This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [10/10] RFC: remove gdb_wait.h


> Date: Fri, 16 Nov 2012 17:27:51 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> Assuming sys/wait.h doesn't get replaced on older GNU/Linux systems,
> this loses these bits:
> 
> /* For native GNU/Linux we may use waitpid and the __WCLONE option.
>   <GRIPE> It is of course dangerous not to use the REAL header file...
>   </GRIPE>.  */
> 
> /* Bits in the third argument to `waitpid'.  */
> #ifndef WNOHANG
> #define WNOHANG         1       /* Don't block waiting.  */
> #endif
> 
> #ifndef WUNTRACED
> #define WUNTRACED       2       /* Report status of stopped children.  */
> #endif
> 
> #ifndef __WCLONE
> #define __WCLONE        0x80000000 /* Wait for cloned process.  */
> #endif
> 
> I'm not sure whether we still encounter systems without these, and
> if gdb works on them at all.

AFAIU, the first 2 are already available on every Posix platform, see
this discussion on the emacs-devel list:

  http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-11/msg00446.html

The 3rd one seems to be used only on Linux, so perhaps we could
depend on its being in sys/wait.h?

> We could move them to say, common/linux-ptrace.h.  __WALL is already there.

That's another option.

Coincidentally, I didn't really object to including the gnulib module,
I was just saying that it might need to be fixed to DTRT on Windows.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]