From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13784 invoked by alias); 23 Aug 2010 08:26:09 -0000 Received: (qmail 13775 invoked by uid 22791); 23 Aug 2010 08:26:07 -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-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Aug 2010 08:26:02 +0000 Received: by wyg36 with SMTP id 36so7145246wyg.0 for ; Mon, 23 Aug 2010 01:26:00 -0700 (PDT) Received: by 10.216.54.208 with SMTP id i58mr2214533wec.48.1282551959213; Mon, 23 Aug 2010 01:25:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.186.205 with HTTP; Mon, 23 Aug 2010 01:25:39 -0700 (PDT) In-Reply-To: <83y6c1prnh.fsf@gnu.org> References: <83fx039kel.fsf@gnu.org> <83y6c1prnh.fsf@gnu.org> From: Hui Zhu Date: Mon, 23 Aug 2010 08:26:00 -0000 Message-ID: Subject: Re: [RFA/DOC] record pic To: Eli Zaretskii Cc: gdb-patches@sourceware.org, Joel Brobecker 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/msg00385.txt.bz2 Thanks Eli, sorry for late. On Fri, Aug 20, 2010 at 17:20, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Fri, 2 Jul 2010 14:28:54 +0800 >> Cc: gdb-patches@sourceware.org >> >> > What's a vcg file? >> >> VCG file is "Visualization of Compiler Graphs". =A0I didn't find other >> good define about it. :( >> There are some introduce about it. >> http://gcc.gnu.org/news/egcs-vcg.html >> http://rw4.cs.uni-sb.de/~sander/html/gsvcg1.html >> >> To see the file. =A0I suggest use http://code.google.com/p/vcgviewer/ > > This information should be added to the docs. > >> >> +set record pic hide-nofunction on|off >> >> + =A0Set or show whether `record pic' hide the nodes that don't have >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0^^^^ >> > "hides" >> > >> > But what does it mean to "hide the nodes"? >> >> 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. > > There should be an explanation about this in the manual and in NEWS. > >> +set record pic hide-nofunction on|off >> + =A0Set or show whether `record pic' hides the nodes that don't have >> + =A0the function name. > > What are "the nodes without function name"? > >> +set record pic hide-nosource on|off >> + =A0Set or show whether `record pic' hides the nodes that don't have >> + =A0the source message. > > What are "nodes that don't have the source message"? =A0And what is a > "source message"? struct symtab_and_line I have change it to "nodes without source line debug message." > >> +set record pic hide-sameaddr on|off >> + =A0Set or show whether `record pic' hides the nodes that have the >> + =A0same address node in vcg file. > > Do you mean here multiple nodes that have the same address? =A0If so, > what will be hidden in that case? all nodes but the first one? Yes. > >> +@kindex set record pic type > > There's no need to index each subcommand of "set record pic", > especially since they all are described one after the other. =A0It's > good enough to have only one "@kindex set record pic" before the first > subcommand. > >> +@item set record pic type @var{type} >> +Set the type of the nodes that @code{record pic} saved. > > Do you mean "the type of nodes that @code{record pic} will save"? > >> +When @var{type} is set to @code{line} (the default), each node of vcg >> +file that @code{record pic} saved will be a line of the inferior. >> + >> +When @var{type} is set to @code{function}, each node of vcg file that >> +@code{record pic} saved will be a function of the inferior. > > Are these two the only types? =A0If not, what are the other possible > values? > There two are the only types for now. Others is not still completed. >> +If ON (the default), @code{record pic} will hides the nodes that don't > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0^^^^^^^^^^ > "will hide" > >> +If ON (the default), @code{record pic} will hides the nodes that > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0^^^^^^^^^^ > "will hide" > >> +If ON (the default), @code{record pic} will hides the nodes that have > > Same here. > >> +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} > > Show where? =A0And what is "c" in @code{c:number}? There part will show a letter "c". for example "c:10". I am not sure this format is right or not. Please help me with it if I made mistake. > >> +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. > > Same here regarding the "i" part. > Same with "c". I make a new patch. Please help me review it. Best, Hui 2010-08-23 Hui Zhu * gdb.texinfo: (Process Record and Replay): Add documentation for command "record pic". --- NEWS | 20 ++++++++++++++++++ doc/gdb.texinfo | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++= +++++ 2 files changed, 80 insertions(+) --- a/NEWS +++ b/NEWS @@ -231,6 +231,26 @@ 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 + The each line or each function will be show in vcg file as a node. + Sometime, we don't want show it. So hide the nodes. + 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 message. + +set record pic hide-sameaddr on|off + Set or show whether `record pic' hides the nodes that have the + same address node in 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,66 @@ 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. + +Vcgviewer (http://code.google.com/p/vcgviewer/) or xvcg can +open this file. + +@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 +file that @code{record pic} saved will be a line of the inferior. + +When @var{type} is set to @code{function}, each node of vcg file that +@code{record pic} saved will be a function of the inferior. + +@item show record pic type +Show the current setting of @code{pic type}. + +@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. So hide the nodes. + +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 message. + +If ON (the default), @code{record pic} will hide the nodes without +source line debug message. + +@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 vcg file. + +If ON (the default), @code{record pic} will hide the nodes that have +the same address node in vcg file. And @code{record pic} will show +the execute count number of this node in format @code{c:number} + +If OFF, @code{record pic} will show the nodes that have the same +address node in vcg file. And @code{record pic} will show the +instruction number in format @code{i:number} that +@value{record goto} support. + +@item show record pic hide-same +Show the current setting of @code{pic hide-same}. + @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.