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: Stan Shebs <stanshebs at earthlink dot net>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Dec 2011 15:30:07 -0800
- 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>
On 12/26/11 10:29 PM, Eli Zaretskii wrote:
Date: Mon, 26 Dec 2011 20:28:43 -0800
From: Stan Shebs<email@example.com>
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
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.
Yeah, I see that went by without comment at the time, but it's a fair point.
I think the answer is that there would be few if any "info os"
subcommands that would be genuinely common to all operating systems that
GDB supports; embedded OSes may not even have a well-defined concept of
processes. On the other hand, one could argue that anything that is not
totally general should be given a OS-specific subcommand, a la "info dos".
For my part, I would tend to favor "info os" for those kinds of data
that are generic enough to be found on more than one target OS. Things
like processes, semaphores, and sockets are found across a broad range
of systems large and small, and it seems unduly pedantic to require
users to do "info linux semaphores" when targeting Linux, but "info bsd
sem" for BSD - or worse, "info freebsd sem" vs "info openbsd sem" - and
which flavor of BSD is Darwin most like, again? :-) Putting things
under "info os" means less detail for users to remember.
And although the patch at hand consists of implementations for Linux, I
don't think any of the types of data are truly Linux-only; the IPC types
are common to all System V inheritors for instance, and even the
seemingly-Linux concept of loadable kernel modules now has a BSD
equivalent. By comparison, "info dos" has subcommands like "gdt"
(global descriptor table) that are not meaningful for any other kind of OS.