[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
H.1 Process list
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 G. 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] | [ ? ] |
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> <column name="cores">1,2,3</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. The `cores' column, if present, should contain a comma-separated list of cores that this process is running on. Target may provide additional columns, which GDB currently ignores.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |