From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26607 invoked by alias); 31 Aug 2007 18:04:16 -0000 Received: (qmail 26591 invoked by uid 22791); 31 Aug 2007 18:04:16 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Aug 2007 18:04:09 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-17-127.inter.net.il [80.230.17.127]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DMU02734 (AUTH halo1); Fri, 31 Aug 2007 21:04:02 +0300 (IDT) Date: Fri, 31 Aug 2007 18:04:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb-patches@sources.redhat.com In-reply-to: <200708311357.04490.ghost@cs.msu.su> (message from Vladimir Prus on Fri, 31 Aug 2007 13:57:04 +0400) Subject: Re: -var-info-path-expression Reply-to: Eli Zaretskii References: <200708221523.32773.ghost@cs.msu.su> <200708311357.04490.ghost@cs.msu.su> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00554.txt.bz2 > From: Vladimir Prus > 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. > +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.