Subject: Re: proc(4): updating for LWP
To: Matt Thomas <>
From: Nathan J. Williams <>
List: tech-kern
Date: 04/02/2003 17:15:45
Matt Thomas <> writes:

> The NetSD proc(4) (AKA procfs) is fairly old and don't understand LWP at
> all.  ttrace(2) from HP-UX might be a better interface for GDB but proc(4)
> can be useful because you don't need a program to glance at things.  It
> also seems (to me) that it'd be easier to adapter to LWPs (and get GDB
> support) than implmenting ttrace(2) from stratch.

I'm in favor of adding LWP support to proc(4), and the Solaris
approach of having lwp/NNN directories for per-LWP state seems
fine. However, it seems wrong to change the entire interface out from
under the rug of anything that currently uses it, so any changes in
semantics of existing /proc/NNN files, or the removal of any files,
should be optional.

I'm also not convinced that we want to have GDB use /proc for
debugging, because it adds a kernel-compile-time dependancy on procfs,
and a runtime dependancy on having /proc mounted. It would be
especially bad if GDB used proc(4) in the "optional Solaris-like"
mode, thus making debugging hard in the face of a
traditionally-mounted /proc.

        - Nathan