On Mon, Mar 09, 2009 at 12:05:37PM -0400, James Carlson wrote: > Perhaps what's needed is a new summary for ::print -- the command line > in the documentation (though oddly not the ::help text) says this: > > [address] ::print [-aCdiLptx] [-c lim] [-l lim] [type [member|offset ... ]] > > ... but that strict [type [member]] nesting (meaning that "type" is > always present when "member" is present) is no longer true.
How's this? --8<-- cut here --8<-- > ::help print NAME print - print the contents of a data structure SYNOPSIS [ addr ] ::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] [type] [member|offset ...] [|::dcmd ...] [ addr ] ::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] -T type [member|offset ...] [|::dcmd ...] [ addr ] ::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] -I [member|offset ...] [|::dcmd ...] DESCRIPTION Print out a datastructure or members of it, using the CTF data compiled into the target. MODES [type] If neither -I or -T type are specified, we check the first arguments for a valid type. If so, then ::print acts as if -T 'type' was specified. If not, ::print acts as if -I was specified. -T type Specifies the type to print. If this consists of multiple words, type must be quoted. (e.g. 'struct foo') -I Infer the type to print from either the pipe type or the CTF information associated with the specified address, if any. -I and '-T type' cannot both be specified. OPTIONS -a Show addresses. For output pipelines, print address of member instead of value. -C Unlimit the length of character arrays. -c limit Limit the length of character arrays. -d Output values in decimal. -h Print holes in structures. -i Interpret address as data of the given type. -L Unlimit the length of standard arrays. -l limit Limit the length of standard arrays. -n Don't print pointers as symbol offsets. -p Interpret address as a physical memory address. -s depth Limit the structure printing depth. -t Show type of object. -x Output values in hexadecimal. -h and -i cannot both be specified. ELEMENTS member Members to print. Specified with standard C syntax using the array indexing operator "[index]", structure member operator ".", and the structure pointer operator "->". To get "*(foo)", do "foo[]". offset Offsets to print. Must be specified using the $[ expression ] syntax. Multiple members and offsets can be specified, and will be printed in the order given. If no members or offsets are specified, the whole datastructure is printed. ATTRIBUTES Target: kvm Module: mdb Interface Stability: Evolving > ::print -Q mdb: illegal option -- Q Usage: [address]::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] [type] [member|offset ...] [|::dcmd ...] [address]::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] -T type [member|offset ...] [|::dcmd ...] [address]::print [-aCdhiLnptx] [-c lim] [-l lim] [-s depth] -I [member|offset ...] [|::dcmd ...] mdb: try '::help print' for more information > --8<-- cut here --8<-- Cheers, - jonathan