From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19393 invoked by alias); 27 Dec 2011 23:30:23 -0000 Received: (qmail 19382 invoked by uid 22791); 27 Dec 2011 23:30:21 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-mealy.atl.sa.earthlink.net (HELO elasmtp-mealy.atl.sa.earthlink.net) (209.86.89.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Dec 2011 23:30:08 +0000 Received: from [70.170.59.51] (helo=macbook2.local) by elasmtp-mealy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1RfgT9-0007CT-TC; Tue, 27 Dec 2011 18:30:08 -0500 Message-ID: <4EFA54FF.1080307@earthlink.net> Date: Wed, 28 Dec 2011 00:05:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Add extra 'info os' information types for Linux (trunk and 7.4) References: <4E95DC58.7030805@codesourcery.com> <4ECD3496.1070609@codesourcery.com> <4EF9497B.9020501@earthlink.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da940b3ed05f6a85ada06fa52940789b60b7f350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00854.txt.bz2 On 12/26/11 10:29 PM, Eli Zaretskii wrote: >> Date: Mon, 26 Dec 2011 20:28:43 -0800 >> From: Stan Shebs >> >> 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. > 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. Stan