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: [RFA/commit] procfs.c: Remove unused functions and make many functions static


> I hesitated doing that in the change you must obviously have in mind 
> because it appeared to me that this source file wants to present a 
> complete API to /proc services, even if some parts are not actually 
> (currently) used by GDB (but may be or may have been sometime).
[...]
> What is unclear to me of course is whether the availability of the 
> complete API (if my perception is indeed correct) is relevant any longer 
> and why the prototypes have never been moved to a header clients could 
> use.

Even if the initial intention was to provide an API, I do not think
it's a good idea to keep maintaining dead code.  Making functions
static is often a big help in figuring out the potential call sites
(you immediately know that you do not have to grep the entire repo).
But the procfs.c file in particular is one file that would deserve
a good cleanup (too many #ifdefs to support the various systems,
and their different versions).  The problem is that I'm not sure
such cleanup would be worth the effort, because I don't think that
the /proc interface has much future in general... Even LynxOS uses
ptrace :). So, my view is that we should contain and isolate that
code as much as we can.

-- 
Joel


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