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: [linux] Always ignore restart/cancellation signals


On Thu, Dec 08, 2005 at 01:38:24PM -0700, Kevin Buettner wrote:
> > Hmm, I thought symbols starting with __ were "reserved by the
> > implemntation" and should not be used by user space programs.

We're a program tightly tied to the implementation, and they're symbols
provided by the implementation.  gdbserver already uses them; rda was
recently changed to use them; gdb/signals/signals.c already uses them.
> 
> For the symbols in question, the header file, <bits/signum.h>, says:
> 
>     /* These are the hard limits of the kernel.  These values should not be
>        used directly at user level.  */
>     #define __SIGRTMIN	32
>     #define __SIGRTMAX	(_NSIG - 1)
> 
> So the comment supports your claim.
> 
> The only alternative that I can think of is to hardcode the constant
> (32, in this case) into the GDB sources.  Of these two approaches, I'd
> prefer to use __ symbol from the system headers.  I do think that we
> ought to check for its existence first though.

I'll do it if you like.  They will exist in all LinuxThreads and NPTL
headers, to the best of my knowledge, and if you don't have either of
those than linux-thread-db.c won't do you any good anyway...

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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