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]

Build failure following: Implement support for checking /proc/PID/coredump_filter commit


  Hi all,

The approved patch "Implement support for checking /proc/PID/coredump_filter
commit"
committed April 1. 2015:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=df84
11da087dc05481926f4c4a82deabc5bc3859

breaks mingw64 with --enable-targets=all configure option.

The reason is the introduction of strtok_r function in gdb/linux-tdep.c
source.
This function is not present in my version of x86_64-w64-mingw32
cross-system (on a Cygwin system).

The function is found in string.h header on native Cygwin, but inside a
conditional:

/usr/include/string.h-46-#if __POSIX_VISIBLE
/usr/include/string.h:47:char   *_EXFUN(strtok_r,(char *__restrict, const
char *__restrict, char **__restrict));
/usr/include/string.h-48-#endif

I did not find any explicit inclusion of string header inside linux-tdep.c
source...

There is a workaround in mingw64 pthread.h:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/pthread.h:455:#ifndef
strtok_r
/usr/x86_64-w64-mingw32/sys-root/mingw/include/pthread.h:456:#define
strtok_r(__s, __sep, __last)  (*(__last) = strtok((__s), (__sep)))
/usr/x86_64-w64-mingw32/sys-root/mingw/include/pthread.h-457-#endif

Does this suggest that strtok_r is not a required string.h function?
If yes, should this function be tested by configure...

Or maybe we should use the gnulib version of strtok_r?
I don't really know how to do this, but if someone can tell me,
I can test the patch.


Pierre Muller



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Sergio Durigan Junior
> Envoyé : mercredi 1 avril 2015 01:40
> À : Pedro Alves
> Cc : GDB Patches
> Objet : Re: [PATCH 1/2] Implement support for checking
> /proc/PID/coredump_filter
> 
> On Friday, March 27 2015, Pedro Alves wrote:
> 
> > OK.
> 
> Thanks, pushed both patches:
> 
>   <https://sourceware.org/ml/gdb-cvs/2015-03/msg00275.html>
>   df8411da087dc05481926f4c4a82deabc5bc3859
> 
> --
> Sergio
> GPG key ID: 0x65FC5E36
> Please send encrypted e-mail if possible
> http://sergiodj.net/


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