From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16970 invoked by alias); 24 Aug 2010 03:19:36 -0000 Received: (qmail 16947 invoked by uid 22791); 24 Aug 2010 03:19:34 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_VC,TW_XV X-Spam-Check-By: sourceware.org Received: from mail-ww0-f41.google.com (HELO mail-ww0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Aug 2010 03:19:28 +0000 Received: by wwd20 with SMTP id 20so793304wwd.0 for ; Mon, 23 Aug 2010 20:19:26 -0700 (PDT) Received: by 10.227.157.84 with SMTP id a20mr5191320wbx.32.1282619966145; Mon, 23 Aug 2010 20:19:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.186.205 with HTTP; Mon, 23 Aug 2010 20:19:06 -0700 (PDT) In-Reply-To: <83hbilnv4n.fsf@gnu.org> References: <83fx039kel.fsf@gnu.org> <83y6c1prnh.fsf@gnu.org> <83hbilnv4n.fsf@gnu.org> From: Hui Zhu Date: Tue, 24 Aug 2010 03:19:00 -0000 Message-ID: Subject: Re: [RFA/DOC] record pic To: Eli Zaretskii Cc: gdb-patches@sourceware.org, brobecker@adacore.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-08/txt/msg00403.txt.bz2 Thanke Eli, On Tue, Aug 24, 2010 at 00:36, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Mon, 23 Aug 2010 16:25:39 +0800 >> Cc: gdb-patches@sourceware.org, Joel Brobecker >> >> I make a new patch. =A0Please help me review it. > > Thanks. =A0It's closer, but still not there. > >> +set record pic hide-nofunction on|off >> + =A0The each line or each function will be show in vcg file as a node. >> + =A0Sometime, we don't want show it. =A0So hide the nodes. >> + =A0Set or show whether `record pic' hides the nodes without function >> + =A0name. > > Rephrase: > > =A0Normally each line and each function will show up as a node in the > =A0VCG file. =A0This command does not save nodes that correspond to > =A0functions. > > Btw, you didn't answer my question what is a "node without function > name". =A0Because of this, I'm not sure the above text I suggest is > correct. =A0Please explain more about this. It like the line, if this address doesn't have the debug message, it will not have the function name. > >> +set record pic hide-nosource on|off >> + =A0Set or show whether `record pic' hides the nodes without source line >> + =A0debug message. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^^^^^^^^^^^ > =A0 =A0 ^^^^^^^^^^^^^ > "source line debug info" > >> +@kindex record pic >> +@item record pic @var{filename} >> +Save the execution log to a VCG file @file{@var{filename}}. >> +Default filename is @file{gdb_record_@var{process_id}.vcg}, >> +where @var{process_id} is the process ID of the inferior. > > Please add here: > > =A0@cindex VCG file > =A0VCG (Visualization of Compiler Graphs) is a format for textual and > =A0readable specification of graph structures. =A0It is used for > =A0visualizing large graphs generated by programs. > >> +Vcgviewer (http://code.google.com/p/vcgviewer/) or xvcg can >> +open this file. > > Please rephrase: > > =A0Various programs such as @uref{http://code.google.com/p/vcgviewer/, > =A0VCGViewer} or @uref{http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.h= tml, > =A0xvcg} can display these files on graphics terminals. > >> +@kindex set record pic type >> +@item set record pic type @var{type} >> +Set the type of nodes that @code{record pic} will save. >> + >> +When @var{type} is set to @code{line} (the default), each node of vcg > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^^^ > "VCG" (upper case). =A0Also "a VCG file", add "a". > >> +file that @code{record pic} saved will be a line of the inferior. > > =A0Each node of a VCG file saved by @code{record pic} will represent a > =A0line in the inferior's code. > >> +When @var{type} is set to @code{function}, each node of vcg file that > > Again, "a VCG file} > >> +@code{record pic} saved will be a function of the inferior. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^^^^^^^^^^^^^^^^^^ > "will represent a function". > > Do you mean that all the lines belonging to a function will be > represented by a single node? No. Each line will be a special note. > >> +@item set record pic hide-nofunction >> +The each line or each function will be show in vcg file as a node. >> +Sometime, we don't want show it. =A0So hide the nodes. > > I still don't understand what this means. =A0Will only the function > nodes hidden? =A0If so, do you mean that the saved nodes will represent > lines, but there will be no nodes that represent functions? =A0How is > this different from saying "set record pic line"? For line and function. The node will be hide when: /* Get the start addr of function. */ addr =3D get_pc_function_start (addr); if (addr =3D=3D 0) { if (record_pic_hide_nofunction) goto exec; When we try to get the function start address. function =3D lookup_minimal_symbol_by_pc (addr); if (!function && record_pic_hide_nofunction) goto exec; And the find the function's name. > >> +@item set record pic hide-nosource >> +Set whether @code{record pic} hides the nodes without source line >> +debug message. > =A0 ^^^^^^^^^^^^^ > "debug information" > >> +If ON (the default), @code{record pic} will hide the nodes that have >> +the same address node in vcg file. =A0And @code{record pic} will show >> +the execute count number of this node in format @code{c:number} > > =A0If ON (the default), @code{record pic} will represent nodes that > =A0have the same address as a single node with a count. =A0The count will > =A0be in the form @code{c:@var{count}}. > >> +If OFF, @code{record pic} will show the nodes that have the same >> +address node in vcg file. =A0And @code{record pic} will show the >> +instruction number in format @code{i:number} that >> +@value{record goto} support. > > Please replace the last sentence with this: > > =A0Each node will show its instruction count in the form > =A0@code{i:@var{num}}. > > Is this i:NUM display shown always, or is it shown only when nodes > with identical addresses are shown individually, as opposed to > collapsed into a single node? It always display. > >> +@item show record pic hide-same >> +Show the current setting of @code{pic hide-same}. > > "hide-same" or "hide-sameaddr"? > I make a new one. please help me review it. Thanks, Hui 2010-08-24 Hui Zhu * gdb.texinfo: (Process Record and Replay): Add documentation for command "record pic". --- NEWS | 21 +++++++++++++++++ doc/gdb.texinfo | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++= +++++ 2 files changed, 87 insertions(+) --- a/NEWS +++ b/NEWS @@ -231,6 +231,27 @@ QTDPsrc * New commands +record pic [] + Save the execution log to a VCG file. + +set record pic type line|function + Set or show the type of the nodes that `record pic' will save. + +set record pic hide-nofunction on|off + Normally each line and each function will show up as a node in the + VCG file. This command does not save nodes that correspond to + functions. + Set or show whether `record pic' hides the nodes without function + name. + +set record pic hide-nosource on|off + Set or show whether `record pic' hides the nodes without source line + debug information. + +set record pic hide-sameaddr on|off + Set or show whether `record pic' hides the nodes that have the + same address node in a VCG file. + eval template, expressions... Convert the values of one or more expressions under the control of the string template to a command line, and call it. --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5678,6 +5678,72 @@ Default filename is @file{gdb_record.@va Restore the execution log from a file @file{@var{filename}}. File must have been created with @code{record save}. +@kindex record pic +@item record pic @var{filename} +Save the execution log to a VCG file @file{@var{filename}}. +Default filename is @file{gdb_record_@var{process_id}.vcg}, +where @var{process_id} is the process ID of the inferior. + +@cindex VCG file +VCG (Visualization of Compiler Graphs) is a format for textual and +readable specification of graph structures. It is used for +visualizing large graphs generated by programs. + +Various programs such as @uref{http://code.google.com/p/vcgviewer/, +VCGViewer} or @uref{http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html, +xvcg} can display these files on graphics terminals. + +@item set record pic type @var{type} +Set the type of nodes that @code{record pic} will save. + +When @var{type} is set to @code{line} (the default), each node of a VCG +file saved by @code{record pic} will represent a line in the inferior's +code. + +When @var{type} is set to @code{function}, each node of a VCG file that +@code{record pic} saved will represent a function of the inferior. + +@item show record pic type +Show the current setting of @code{pic type}. + +@item set record pic hide-nofunction +Normally each line and each function will show up as a node in the +VCG file. This command does not save nodes that correspond to +functions. + +Set whether @code{record pic} hides the nodes without function name. + +If ON (the default), @code{record pic} will hide the nodes without +function name. + +@item show record pic hide-nofunction +Show the current setting of @code{pic hide-nofunction}. + +@item set record pic hide-nosource +Set whether @code{record pic} hides the nodes without source line +debug information. + +If ON (the default), @code{record pic} will hide the nodes without +source line debug information. + +@item show record pic hide-nosource +Show the current setting of @code{pic hide-nosource}. + +@item set record pic hide-sameaddr +Set whether @code{record pic} hides the nodes that have the same +address node in a VCG file. + +If ON (the default), @code{record pic} will represent nodes that +have the same address as a single node with a count. The count will +be in the form @code{c:@var{count}}. + +If OFF, @code{record pic} will show the nodes that have the same +address node in a VCG file. Each node will show its instruction +number in the form @code{i:@var{num}}. + +@item show record pic hide-sameaddr +Show the current setting of @code{pic hide-sameaddr}. + @kindex set record insn-number-max @item set record insn-number-max @var{limit} Set the limit of instructions to be recorded. Default value is 200000.