From: Joel Brobecker <brobecker@adacore.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix /proc pathname sizes on Solaris
Date: Wed, 19 Sep 2018 13:21:00 -0000 [thread overview]
Message-ID: <20180919132118.GM19172@adacore.com> (raw)
In-Reply-To: <yddin31n9i3.fsf@CeBiTec.Uni-Bielefeld.DE>
> I've done some more digging myself: here's what I found:
>
> * The MAX_PROC_NAME_SIZE part (done slightly differently) was originally
> done by Stefan Teleman when he imported gdb 7.6 into the userland repo
> (gdb.procfs.c.patch).
>
> * The change to create_procinfo originated with April Chin when
> importing gdb 7.12.1 later (001-fix-proc-name-size.patch).
>
> * I had to make minor adjustments for master to account for my removal
> of !NEW_PROC_API
>
> So I'm going to attribute the patch to all three of us ;-)
Sounds good :).
> >> @@ -483,7 +483,7 @@ create_procinfo (int pid, int tid)
> >> }
> >> else
> >> {
> >> - sprintf (pi->pathname, "/proc/%05d/lwp/%d", pid, tid);
> >> + sprintf (pi->pathname, "/proc/%d/lwp/%d", pid, tid);
> >
> > I am wondering how this ever worked for processes whose pid had
> > fewer than 5 digits. I was initially concerned that this patch
> > introduced a change of behavior that would create an incompatibility.
> > But looking at Solaris 2.8 and 2.11 systems, I see processes with
> > 3 or 4 digits PIDs, and the path in /proc doesn't have leading zeroes.
>
> Indeed, and Solaris procfs doesn't care if the <pid> part contains
> additional leading zeros or not.
>
> > I also checked whether the file might be used on platforms other than
> > Solaris (see configure.nat), and this does not appear to be the case.
>
> True: I removed support for all other previous users when getting rid of
> !NEW_PROC_API, IRIX and Tru64 UNIX support that had long been obsoleted.
Excellent. An extra confirmation is always nice.
--
Joel
next prev parent reply other threads:[~2018-09-19 13:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 14:11 Rainer Orth
2018-09-17 18:35 ` Joel Brobecker
2018-09-17 19:27 ` Rainer Orth
2018-09-19 9:04 ` Rainer Orth
2018-09-19 13:21 ` Joel Brobecker [this message]
2018-09-19 12:58 ` Tom Tromey
2018-09-19 13:28 ` Rainer Orth
2018-09-19 15:16 ` Pedro Alves
2018-09-19 17:42 ` Rainer Orth
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=20180919132118.GM19172@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/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