-var-info-path-expression

Vladimir Prus ghost@cs.msu.su
Fri Aug 31 18:53:00 GMT 2007


On Friday 31 August 2007 22:04:03 Eli Zaretskii wrote:
> > From: Vladimir Prus <ghost@cs.msu.su>
> > Date: Fri, 31 Aug 2007 13:57:04 +0400
> > Cc: gdb-patches@sources.redhat.com
> > 
> > > How about if you write a real-life example of the output generated by
> > > both commands (i.e. with real expressions, not @var{something}), and
> > > place both of the examples in each section to show how the two
> > > commands differ?  Alternatively, have only one example in each
> > > section, and point to the other, as in "Contrast this with the output
> > > generated by -var-info-path-expression below."
> > 
> > How about this patch? If has real examples, and tries to stress the
> > fact that -var-info-expression is only for UI presentation, while
> > -var-info-path-expression is for getting an expression you can actually
> > evaluate.
> 
> Thanks, this needs only a few minot fixes:
> 
> > +For example, if @var{a} is an array, and variable object
> > +@var{A} was created for @var{a}, then we'll get this output:
> 
> It's wrong to use @var in this context: here, `a' and `A' are literal
> symbols, they do not stand for something else.  So you should use
> @code, not @var.

So, @var is not for programming language variables (like docbook's varname),
but rather a placeholder (like docbook's replaceable)?
 
> > +Here, the values of @var{lang} can be @code{@{"C" | "C++" | "Java"@}}.
> 
> Again, "lang" is a literal string, so use @code.
> 
> > +For example, suppose @var{C} is a C++ class, derived from class
>                                      ^^^
> Please use "C@t{++}", it looks better in print.
> 
> > +@var{Base}, and that the @var{Base} class has a member called
> > +@var{m_size}.  Assume a variable @var{c} is has the type of
> > +@var{C} and a variable object @var{C} was created for variable
> > +@var{c}.  Then, we'll get this output:
> > +@smallexample
> > +(gdb) -var-info-path-expression C.Base.public.m_size
> > +^done,path_expr=((Base)c).m_size)
> > +@end smallexample
> 
> Here, too, all the symbols should have the @code markup.
> 
> Thanks again for working on this.

Thanks for review. Here's the version I've checked in to CVS.

- Volodya





-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_expression_as_comitted.diff
Type: text/x-diff
Size: 27349 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070831/13081684/attachment.bin>


More information about the Gdb-patches mailing list