From: Eli Zaretskii <eliz@gnu.org>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [linux] Always ignore restart/cancellation signals
Date: Fri, 09 Dec 2005 14:46:00 -0000 [thread overview]
Message-ID: <uzmnajxuh.fsf@gnu.org> (raw)
In-Reply-To: <20051208204301.GA29490@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 8 Dec 2005 15:43:01 -0500)
> Date: Thu, 8 Dec 2005 15:43:01 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sources.redhat.com
>
> 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.
There's no need to, IMHO. I think Jim was wrong: symbols starting
with __ are indeed reserved for the implementation, but the meaning of
that reservation is that user code should not _define_ such symbols,
not that it must not use them. In effect, this rule sets up a
namespace that the library implementation can use without risking that
it steps on the feet of user code. But if we don't define any symbols
that begin with __, we are safe accessing them, I think.
I have no idea why the above comment from bits/signum.h was written.
I think it is wrong and the glibc maintainers should be asked to
either remove it or explain why they think these symbols should not be
used at user level.
next prev parent reply other threads:[~2005-12-09 11:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 21:10 Daniel Jacobowitz
2005-12-09 10:39 ` Mark Kettenis
2005-12-09 11:09 ` Kevin Buettner
2005-12-09 11:26 ` Daniel Jacobowitz
2005-12-09 11:48 ` Kevin Buettner
2005-12-09 14:46 ` Eli Zaretskii [this message]
2005-12-09 20:52 ` Daniel Jacobowitz
2005-12-09 20:49 ` Daniel Jacobowitz
2005-12-09 21:55 ` Eli Zaretskii
2005-12-09 23:13 ` Daniel Jacobowitz
2005-12-10 1:20 ` Eli Zaretskii
2005-12-10 1:29 ` Daniel Jacobowitz
2005-12-10 1:29 ` Eli Zaretskii
2005-12-10 1:49 ` Mark Kettenis
2005-12-10 2:10 ` Daniel Jacobowitz
2005-12-10 4:47 ` Mark Kettenis
2005-12-10 1:34 ` Jim Blandy
2005-12-11 17:26 ` Eli Zaretskii
2006-02-20 17:01 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uzmnajxuh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox