[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

G. Operating System Information

Users of GDB often wish to obtain information about the state of the operating system running on the target--for example the list of processes, or the list of open files. This section describes the mechanism that makes it possible. This mechanism is similar to the target features mechanism (see section Target Descriptions), but focuses on a different aspect of target.

Operating system information is retrived from the target via the remote protocol, using `qXfer' requests (see qXfer osdata read). The object name in the request should be `osdata', and the annex identifies the data to be fetched.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

G.1 Process list

When requesting the process list, the annex field in the `qXfer' request should be `processes'. The returned data is an XML document. The formal syntax of this document is defined in `gdb/features/osdata.dtd'.

An example document is:

 
<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "osdata.dtd">
<osdata type="processes">
  <item>
    <column name="pid">1</column>
    <column name="user">root</column>
    <column name="command">/sbin/init</column>
  </item>
</osdata>

Each item should include a column whose name is `pid'. The value of that column should identify the process on the target. The `user' and `command' columns are optional, and will be displayed by GDB. Target may provide additional columns, which GDB currently ignores.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated on January, 20 2010 using texi2html 1.76.