From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17105 invoked by alias); 12 Jun 2012 01:13:53 -0000 Received: (qmail 17096 invoked by uid 22791); 12 Jun 2012 01:13:51 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-scoter.atl.sa.earthlink.net (HELO elasmtp-scoter.atl.sa.earthlink.net) (209.86.89.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jun 2012 01:13:39 +0000 Received: from [68.96.200.16] (helo=macbook2.local) by elasmtp-scoter.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1SeFfu-0000EC-3D for gdb-patches@sourceware.org; Mon, 11 Jun 2012 21:13:38 -0400 Message-ID: <4FD697C1.8020400@earthlink.net> Date: Tue, 12 Jun 2012 01:13:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH v2] Add the "-info-os" command to MI References: <4FBC2F40.2010907@earthlink.net> <4FBCC6BE.9010304@redhat.com> <4FBCF671.2080305@earthlink.net> <4FD28387.40005@earthlink.net> In-Reply-To: <4FD28387.40005@earthlink.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da9407f79e238c245bea742a1a5c26ca36bdd350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: 2012-06/txt/msg00322.txt.bz2 On 6/8/12 3:58 PM, Stan Shebs wrote: > On 6/1/12 3:09 AM, Vladimir Prus wrote: >> On 23/05/12 18:38, Stan Shebs wrote: >>> @{width="10",alignment="-1",col_name="col1",colhdr="Description"@}], >>> +body=[item=@{col0="processes",col1="Listing of all processes"@}, >>> + item=@{col0="procgroups",col1="Listing of all process groups"@}, >>> + item=@{col0="threads",col1="Listing of all threads"@}, >>> + item=@{col0="files",col1="Listing of all file descriptors"@}, >>> + item=@{col0="sockets",col1="Listing of all internet-domain >>> sockets"@}, >>> + item=@{col0="shm",col1="Listing of all shared-memory regions"@}, >>> + item=@{col0="semaphores",col1="Listing of all semaphores"@}, >>> + item=@{col0="msg",col1="Listing of all message queues"@}, >>> + item=@{col0="modules",col1="Listing of all loaded kernel >> >> Stan, >> >> I am afraid this output is not really good enough. From MI consumer >> standpoint, we need a clear >> and concise labels for each resource type. Unfortunately, "shm" is >> not acceptable at all. >> "Listing of all shared-memory regions" is unacceptably long. Besides, >> this would make a good title >> for a table with output, but not really good title for a menu used to >> specify what to show. For >> the record, here's the labels I have to use in actual UI code: >> >> ResourceClassContributionItem_0=Processes >> ResourceClassContributionItem_10=Shared memory regions >> ResourceClassContributionItem_12=Semaphores >> ResourceClassContributionItem_14=Message queues >> ResourceClassContributionItem_16=Kernel modules >> ResourceClassContributionItem_2=Process groups >> ResourceClassContributionItem_4=Threads >> ResourceClassContributionItem_6=Files >> ResourceClassContributionItem_8=Sockets >> >> Could GDB be made to output such labels? > > Thinking about this a bit, it would work to add a third column to the > types listing, call it "Title", and define it as something like "short > distinctive phrase using whole words" or something like that, and with > a note in the manual that the title would ideally be phrased to be > suitable for a menu of types. This lets it occupy a middle ground > between the ultra-short string that is suitable for a subcommand in > the CLI, and the fully description that is suitable to head up a > listing of objects. > > I'll work up a patch along these lines. In keeping with the apparent > tradition of numbered columns in the listing of types :-), I'll supply > titles as "col2". There is an unfortunate unexpected consequence to this, namely that CLI "info os" also puts out the titles (because both MI and CLI use the same code to format tables of data), and because of the way formatting works, the CLI output runs description and title together to create gems like "Listing of all process groups Process groups". It's not unusable, just confusing. The hack workaround is to use ui_out_is_mi_like_p, but that's only for absolutely necessary situations. I'll look around a bit for other ideas, and welcome anybody's suggestions. Stan