This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Add extra 'info os' information types for Linux (trunk and 7.4)
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: eliz at gnu dot org
- Cc: stanshebs at earthlink dot net, gdb-patches at sourceware dot org
- Date: Tue, 27 Dec 2011 22:24:39 +0100 (CET)
- Subject: Re: [PATCH] Add extra 'info os' information types for Linux (trunk and 7.4)
- References: <4E95DC58.email@example.com> <firstname.lastname@example.org> <4ECD3496.email@example.com> <4EF9497B.firstname.lastname@example.org> <E1RfQXH-0004RB-1H@fencepost.gnu.org>
> Date: Tue, 27 Dec 2011 01:29:19 -0500
> From: Eli Zaretskii <email@example.com>
> > Date: Mon, 26 Dec 2011 20:28:43 -0800
> > From: Stan Shebs <firstname.lastname@example.org>
> > Here is a third revision of the 'info os' additions for Linux; it rolls
> > up Kwok's original patch plus requested edits, plus a few more comments
> > and tweaks. I plan to commit this in a day or so, if there are no
> > objections.
> I already voiced an objection the first time: I think Linux-specific
> OS information doesn't belong to "info os", which should be for
> commands generally available on all supported systems. I would
> support an "info linux" command for what you want here.
I have largely ignored this discussion so far. The operating system
of my choice comes with a fairly complete and consistent set of tools
to gather information from the OS, and I feel GDB should not try to
reimplement functionality that already exists. But I realize that
things are a little bit different on Linux, especially when debugging
"embedded" systems remotely. There is a clear need for this sort of
additional information about the system the process is running on,
given the fact that diffs adding this kind of functionality keep
Eli, I don't think your objection makes a lot of sense. The "info os"
is a generic command for displaying "osdata" that's made available by
the backend. It is for the backend to decide what information is made
available. This diff just adds a bit more "osdata" to the Linux
native backend and the Linux gdbserver remote backend. I do think
though that the way Stan's diff changes the documentation of the "info
os" command isn't quite right. The generic description of the "info
os" command should come first, followed by documentation of the
specific "osdata" types for the backends that are part of GDB.
I am a bit worried though that the "info proc" stuff that was recently
discussed seems to overlap with the "info os" stuff implemented here.
I also feel that new functionality like this doesn't really belong on
the 7.4 branch.