[PATCH] Add extra 'info os' information types for Linux (trunk and 7.4)

Pedro Alves alves.ped@gmail.com
Mon Jan 2 19:31:00 GMT 2012


On 01/02/2012 12:35 PM, Eli Zaretskii wrote:
>> Date: Mon, 02 Jan 2012 12:08:37 +0000
>> From: Pedro Alves<alves.ped@gmail.com>
>> CC: Eli Zaretskii<eliz@gnu.org>, gdb-patches@sourceware.org
>>
>> The idea of "info os" is to leave GDB completely agnostic of what is
>> it the backend decides to present to the user/frontend.  GDB only
>> knows that it is being given a table with columns and lines.  We
>> should not assume that "info os FOO" means the same thing on
>> different OSs.  FOO in "info os FOO" is completely not standardized.
>
> As I already wrote, I have absolutely no problems with that, provided
> that we apply this logic consistently.  Doing so would mean that we
> should gather all the OS-specific "info MyOS SOMETHING" under the
> single "info os" roof, and remove "info dos", "info w32", etc.

Provided those commands output tabular form data, and, have no
dependency on current inferior context (e.g., apply to the
current inferior only), then it would work.  I don't think at
least "info w32" is not a good fit for that reason.  "info os"
really lists info about everything (all processes, threads, etc.) 
running on the target.  E.g., on GNU/Linux, "info os sem" lists
all semaphores in the system, not just the current inferior's.

Also, "info os" is not a full replacement for a hard coded command
today.  E.g., we'd lose the specific online help for those
commands' and their sub-fields, given the generality of "info os".

-- 
Pedro Alves



More information about the Gdb-patches mailing list