This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] -list-target-groups --available

On Sat, Nov 22, 2008 at 07:39:41PM +0300, Vladimir Prus wrote:
> > This version has DTD. It also has documentation -- Eli, can you review it.
> > I did you found a good place where new "info os processes" should be documented,
> > any suggestions?

In addition to the new info commands, there's also a new set remote
command to control use of the packet; the new packet; and the new
qSupported response.  All of these need documentation.  Sorry,
back to you :-(

> +@node Operating System Information
> +@appendix Operating System Information
> +@cindex operating system information
> +
> +Users of @value{GDBN} often wish to obtain information about state of

about the state

> +the operating system running on the target---for example the list of
> +processes, or the list open files.  This section describes the

list of open files

> +mechanism that makes it possible.  This mechanism is similar to the 
> +target features mechanism (@pxref{Target Descriptions}), but focuses
> +on different aspect of target.

on a different

> +Operating system information is retrived from the target via the
> +remote protocol, using @samp{qXfer} requests (@pxref{General Query Packets,
> +qXfer}).  The object name in the request should be @samp{osdata}, and
> +the @var{annex} identifies the data to be fetched.

You can add an anchor to the new packet when it's documented and use
that here; iirc that's already done for some qXfer packets.

> +@node Process list
> +@section Process list
> +@cindex operating system information, process list
> +
> +When requesting process list, the @var{annex} field in the

requesting the process list

> +@samp{qXfer} request should be @samp{processes}.  The returned data is
> +an XML document.  The formal syntax of this document is defined in
> +@file{gdb/features/gdb-target.dtd}.

Wrong DTD.

> +The example content is:

Not sure - "An example document is"?

> +@smallexample
> +<?xml version="1.0"?>
> +<!DOCTYPE target SYSTEM "gdb-target.dtd">

Wrong DTD again.

> +<!-- process-list: Root element with versioning -->

It's <osdata> not <process-list>.  Also there's no version - you
should probably add one, like done for the existing target description
DTD (<target>).

> diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
> index 5af5611..24ed5dd 100644
> --- a/gdb/testsuite/gdb.server/ext-run.exp
> +++ b/gdb/testsuite/gdb.server/ext-run.exp
> @@ -44,5 +44,11 @@ gdb_test "set remote exec-file $target_exec" "" "set remote exec-file"
>  gdb_breakpoint main
>  gdb_test "run" "Breakpoint.* main .*" "continue to main"
> +if { [istarget *-*-linux*] } {
> +    # On Linux, gdbserver can also report the list of processes.
> +# 1 +root +/sbin/init\n.*
> +    gdb_test "info os processes" ".*pid +user +command.*1 +root +/sbin/init.*" "get process list"
> +}

Stray commented line?  Testcase looks fine otherwise.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]