* [RFA/DOC] record pic @ 2010-07-01 7:12 Hui Zhu 2010-07-01 17:31 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-07-01 7:12 UTC (permalink / raw) To: gdb-patches ml, Eli Zaretskii Hi Eli, This is the patch to add the "record pic" to the gdb.texinfo and NEWS. Please help me review it. Thanks, Hui 2010-07-01 Hui Zhu <teawater@gmail.com> * gdb.texinfo: (Process Record and Replay): Add documentation for command "record pic". --- NEWS | 18 ++++++++++++++++ doc/gdb.texinfo | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) --- a/NEWS +++ b/NEWS @@ -118,6 +118,24 @@ qRelocInsn * New commands +record pic [<FILENAME>] + 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' saved. + +set record pic hide-nofunction on|off + Set or show whether `record pic' hide the nodes that don't have + the function name. + +set record pic hide-nosource on|off + Set or show whether `record pic' hide the nodes that don't have + the source message. + +set record pic hide-sameaddr on|off + Set or show whether `record pic' hide 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 @@ -5657,6 +5657,68 @@ 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. + +@kindex set record pic type +@item set record pic type @var{type} +Set the type of the nodes that @code{record pic} saved. + +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. + +@kindex show record pic type +@item show record pic type +Show the current setting of @code{pic type}. + +@kindex set record pic hide-nofunction +@item set record pic hide-nofunction +Set whether @code{record pic} hide the nodes that don't have +the function name. + +If ON (the default), @code{record pic} will hide the nodes that don't +have the function name. + +@kindex show record pic hide-nofunction +@item show record pic hide-nofunction +Show the current setting of @code{pic hide-nofunction}. + +@kindex set record pic hide-nosource +@item set record pic hide-nosource +Set whether @code{record pic} hide the nodes that don't have +the source message. + +If ON (the default), @code{record pic} will hide the nodes that +don't have the source message. + +@kindex show record pic hide-nosource +@item show record pic hide-nosource +Show the current setting of @code{pic hide-nosource}. + +@kindex set record pic hide-sameaddr +@item set record pic hide-sameaddr +Set whether @code{record pic} hide 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. + +@kindex show record pic hide-same +@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. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-07-01 7:12 [RFA/DOC] record pic Hui Zhu @ 2010-07-01 17:31 ` Eli Zaretskii 2010-07-02 6:29 ` Hui Zhu 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2010-07-01 17:31 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches > From: Hui Zhu <teawater@gmail.com> > Date: Thu, 1 Jul 2010 15:12:25 +0800 > > +record pic [<FILENAME>] > + Save the execution log to a vcg file. What's a vcg file? > +set record pic hide-nofunction on|off > + Set or show whether `record pic' hide the nodes that don't have ^^^^ "hides" But what does it mean to "hide the nodes"? > +set record pic hide-nosource on|off > + Set or show whether `record pic' hide the nodes that don't have ^^^^ "hides" > + Set or show whether `record pic' hide the nodes that have the ^^^^ "hides" > +Default filename is @file{gdb_record_@var{process_id}}.vcg, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @file{gdb_record_@var{process_id}.vcg} > +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. This is a charade that I cannot unlock. "Node"? "each node will be a line"? What does all that mean? I think it would help if you explain up front what is the VCG file, how it can be used once created, and what is the significance of having each "node" in it be line or function. Then this text will make sense. > +Set whether @code{record pic} hide the nodes that don't have ^^^^ "hides" > +Set whether @code{record pic} hide the nodes that don't have ^^^^ "hides" > +Set whether @code{record pic} hide the nodes that have the same ^^^^ "hides" I will get back and review the rest when you add those explanations and I understand better what is this all about. Thanks. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-07-01 17:31 ` Eli Zaretskii @ 2010-07-02 6:29 ` Hui Zhu 2010-08-20 9:22 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-07-02 6:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches Thanks Eli. On Fri, Jul 2, 2010 at 01:33, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Thu, 1 Jul 2010 15:12:25 +0800 >> >> +record pic [<FILENAME>] >> + Save the execution log to a vcg file. > > What's a vcg file? VCG file is "Visualization of Compiler Graphs". I 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. I suggest use http://code.google.com/p/vcgviewer/ > >> +set record pic hide-nofunction on|off >> + Set or show whether `record pic' hide the nodes that don't have > ^^^^ > "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. So hide the nodes. > >> +set record pic hide-nosource on|off >> + Set or show whether `record pic' hide the nodes that don't have > ^^^^ > "hides" > >> + Set or show whether `record pic' hide the nodes that have the > ^^^^ > "hides" > >> +Default filename is @file{gdb_record_@var{process_id}}.vcg, > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > @file{gdb_record_@var{process_id}.vcg} > >> +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. > > This is a charade that I cannot unlock. "Node"? "each node will be a > line"? What does all that mean? > > I think it would help if you explain up front what is the VCG file, > how it can be used once created, and what is the significance of > having each "node" in it be line or function. Then this text will > make sense. > >> +Set whether @code{record pic} hide the nodes that don't have > ^^^^ > "hides" > >> +Set whether @code{record pic} hide the nodes that don't have > ^^^^ > "hides" > >> +Set whether @code{record pic} hide the nodes that have the same > ^^^^ > "hides" > > I will get back and review the rest when you add those explanations > and I understand better what is this all about. > > Thanks. > 2010-07-02 Hui Zhu <teawater@gmail.com> * gdb.texinfo: (Process Record and Replay): Add documentation for command "record pic". --- NEWS | 18 ++++++++++++++++ doc/gdb.texinfo | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) --- a/NEWS +++ b/NEWS @@ -158,6 +158,24 @@ qXfer:statictrace:read * New commands +record pic [<FILENAME>] + 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' saved. + +set record pic hide-nofunction on|off + Set or show whether `record pic' hides the nodes that don't have + the function name. + +set record pic hide-nosource on|off + Set or show whether `record pic' hides the nodes that don't have + the source 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 @@ -5657,6 +5657,68 @@ 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. + +@kindex set record pic type +@item set record pic type @var{type} +Set the type of the nodes that @code{record pic} saved. + +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. + +@kindex show record pic type +@item show record pic type +Show the current setting of @code{pic type}. + +@kindex set record pic hide-nofunction +@item set record pic hide-nofunction +Set whether @code{record pic} hides the nodes that don't have +the function name. + +If ON (the default), @code{record pic} will hides the nodes that don't +have the function name. + +@kindex show record pic hide-nofunction +@item show record pic hide-nofunction +Show the current setting of @code{pic hide-nofunction}. + +@kindex set record pic hide-nosource +@item set record pic hide-nosource +Set whether @code{record pic} hides the nodes that don't have +the source message. + +If ON (the default), @code{record pic} will hides the nodes that +don't have the source message. + +@kindex show record pic hide-nosource +@item show record pic hide-nosource +Show the current setting of @code{pic hide-nosource}. + +@kindex set record pic hide-sameaddr +@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 hides 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. + +@kindex show record pic hide-same +@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. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-07-02 6:29 ` Hui Zhu @ 2010-08-20 9:22 ` Eli Zaretskii 2010-08-23 8:26 ` Hui Zhu 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2010-08-20 9:22 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches > From: Hui Zhu <teawater@gmail.com> > 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". I 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. I suggest use http://code.google.com/p/vcgviewer/ This information should be added to the docs. > >> +set record pic hide-nofunction on|off > >> + Â Set or show whether `record pic' hide the nodes that don't have > > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ^^^^ > > "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. So hide the nodes. There should be an explanation about this in the manual and in NEWS. > +set record pic hide-nofunction on|off > + Set or show whether `record pic' hides the nodes that don't have > + the function name. What are "the nodes without function name"? > +set record pic hide-nosource on|off > + Set or show whether `record pic' hides the nodes that don't have > + the source message. What are "nodes that don't have the source message"? And what is a "source 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. Do you mean here multiple nodes that have the same address? If so, what will be hidden in that case? all nodes but the first one? > +@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. It'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? If not, what are the other possible values? > +If ON (the default), @code{record pic} will hides the nodes that don't ^^^^^^^^^^ "will hide" > +If ON (the default), @code{record pic} will hides the nodes that ^^^^^^^^^^ "will hide" > +If ON (the default), @code{record pic} will hides the nodes that have Same here. > +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} Show where? And what is "c" in @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. Same here regarding the "i" part. Thanks. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-20 9:22 ` Eli Zaretskii @ 2010-08-23 8:26 ` Hui Zhu 2010-08-23 16:35 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-08-23 8:26 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, Joel Brobecker Thanks Eli, sorry for late. On Fri, Aug 20, 2010 at 17:20, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> 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". I 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. I suggest use http://code.google.com/p/vcgviewer/ > > This information should be added to the docs. > >> >> +set record pic hide-nofunction on|off >> >> + Set or show whether `record pic' hide the nodes that don't have >> > ^^^^ >> > "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. So hide the nodes. > > There should be an explanation about this in the manual and in NEWS. > >> +set record pic hide-nofunction on|off >> + Set or show whether `record pic' hides the nodes that don't have >> + the function name. > > What are "the nodes without function name"? > >> +set record pic hide-nosource on|off >> + Set or show whether `record pic' hides the nodes that don't have >> + the source message. > > What are "nodes that don't have the source message"? And 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 >> + Set or show whether `record pic' hides the nodes that have the >> + same address node in vcg file. > > Do you mean here multiple nodes that have the same address? If 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. It'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? If 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 > ^^^^^^^^^^ > "will hide" > >> +If ON (the default), @code{record pic} will hides the nodes that > ^^^^^^^^^^ > "will hide" > >> +If ON (the default), @code{record pic} will hides the nodes that have > > Same here. > >> +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} > > Show where? And 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. And @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 <teawater@gmail.com> * 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 [<FILENAME>] + 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. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-23 8:26 ` Hui Zhu @ 2010-08-23 16:35 ` Eli Zaretskii 2010-08-24 3:19 ` Hui Zhu 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2010-08-23 16:35 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, brobecker > From: Hui Zhu <teawater@gmail.com> > Date: Mon, 23 Aug 2010 16:25:39 +0800 > Cc: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com> > > I make a new patch. Please help me review it. Thanks. It's closer, but still not there. > +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. Rephrase: 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. Btw, you didn't answer my question what is a "node without function name". Because of this, I'm not sure the above text I suggest is correct. Please explain more about this. > +set record pic hide-nosource on|off > + Set or show whether `record pic' hides the nodes without source line > + debug message. ^^^^^^^^^^^ ^^^^^^^^^^^^^ "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: @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. > +Vcgviewer (http://code.google.com/p/vcgviewer/) or xvcg can > +open this file. Please rephrase: 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. > +@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 ^^^ "VCG" (upper case). Also "a VCG file", add "a". > +file that @code{record pic} saved will be a line of the inferior. 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 vcg file that Again, "a VCG file} > +@code{record pic} saved will be a function of the inferior. ^^^^^^^^^^^^^^^^^^ "will represent a function". Do you mean that all the lines belonging to a function will be represented by a single node? > +@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. I still don't understand what this means. Will only the function nodes hidden? If so, do you mean that the saved nodes will represent lines, but there will be no nodes that represent functions? How is this different from saying "set record pic line"? > +@item set record pic hide-nosource > +Set whether @code{record pic} hides the nodes without source line > +debug message. ^^^^^^^^^^^^^ "debug information" > +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 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 vcg file. And @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: Each node will show its instruction count in the form @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? > +@item show record pic hide-same > +Show the current setting of @code{pic hide-same}. "hide-same" or "hide-sameaddr"? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-23 16:35 ` Eli Zaretskii @ 2010-08-24 3:19 ` Hui Zhu 2010-08-24 17:22 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-08-24 3:19 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, brobecker Thanke Eli, On Tue, Aug 24, 2010 at 00:36, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Mon, 23 Aug 2010 16:25:39 +0800 >> Cc: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com> >> >> I make a new patch. Please help me review it. > > Thanks. It's closer, but still not there. > >> +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. > > Rephrase: > > 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. > > Btw, you didn't answer my question what is a "node without function > name". Because of this, I'm not sure the above text I suggest is > correct. Please 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 >> + Set or show whether `record pic' hides the nodes without source line >> + debug message. ^^^^^^^^^^^ > ^^^^^^^^^^^^^ > "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: > > @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. > >> +Vcgviewer (http://code.google.com/p/vcgviewer/) or xvcg can >> +open this file. > > Please rephrase: > > 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. > >> +@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 > ^^^ > "VCG" (upper case). Also "a VCG file", add "a". > >> +file that @code{record pic} saved will be a line of the inferior. > > 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 vcg file that > > Again, "a VCG file} > >> +@code{record pic} saved will be a function of the inferior. > ^^^^^^^^^^^^^^^^^^ > "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. So hide the nodes. > > I still don't understand what this means. Will only the function > nodes hidden? If so, do you mean that the saved nodes will represent > lines, but there will be no nodes that represent functions? How 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 = get_pc_function_start (addr); if (addr == 0) { if (record_pic_hide_nofunction) goto exec; When we try to get the function start address. function = 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. > ^^^^^^^^^^^^^ > "debug information" > >> +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 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 vcg file. And @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: > > Each node will show its instruction count in the form > @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 <teawater@gmail.com> * 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 [<FILENAME>] + 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. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-24 3:19 ` Hui Zhu @ 2010-08-24 17:22 ` Eli Zaretskii 2010-08-25 2:28 ` Hui Zhu 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2010-08-24 17:22 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, brobecker > From: Hui Zhu <teawater@gmail.com> > Date: Tue, 24 Aug 2010 11:19:06 +0800 > Cc: gdb-patches@sourceware.org, brobecker@adacore.com > > >> +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. > > > > Rephrase: > > > > Â 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. > > > > Btw, you didn't answer my question what is a "node without function > > name". Â Because of this, I'm not sure the above text I suggest is > > correct. Â Please explain more about this. > > It like the line, if this address doesn't have the debug message, it > will not have the function name. When would a function lack debug info? in a stripped executable? If so, what would "record pic" produce for functions that cannot be found in the symbol table, when hide-nofunction is OFF? > >> +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. > > Â Â Â Â Â Â Â Â Â Â Â Â Â ^^^^^^^^^^^^^^^^^^ > > "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. I'm confused. You say that when "set record pic function" is in effect, each node of the VCG file will be a function. Now you are saying that each line "will be a special note". What note? and how is this different from "set record pic line"? Maybe you could show a fragment of the produced VCG file under each option and command, so I could understand what is the effect of each one of them, and suggest the appropriate text for the manual. > >> +@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. > > > > I still don't understand what this means. Â Will only the function > > nodes hidden? Â If so, do you mean that the saved nodes will represent > > lines, but there will be no nodes that represent functions? Â How 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 = get_pc_function_start (addr); > if (addr == 0) > { > if (record_pic_hide_nofunction) > goto exec; > When we try to get the function start address. > function = lookup_minimal_symbol_by_pc (addr); > if (!function && record_pic_hide_nofunction) > goto exec; > And the find the function's name. This seems to say that hide-nofunction affects the situations where we cannot get the function's address, or couldn't find its entry in the symtab. Is that right? Is this option effective only for such functions? If so, what will be produced in the VCG file when a function has no address or is not in the symtab, but hide-nofunction is OFF? Again, a fragment from the file for each possibility would be great to explain to me what to write in the manual. > >> +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. > > > > Please replace the last sentence with this: > > > > Â Each node will show its instruction count in the form > > Â @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. Then please don't tell this as part of describing hide-sameaddr OFF. Describe it separately, to avoid the impression that hide-sameaddr somehow affects the i:NUM display. > I make a new one. please help me review it. I will wait with the rest of the review until I understand the issues better, according to your answers to the above questions. Thanks. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-24 17:22 ` Eli Zaretskii @ 2010-08-25 2:28 ` Hui Zhu 2010-08-27 14:40 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-08-25 2:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, brobecker Thanks Eli. On Wed, Aug 25, 2010 at 01:24, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Tue, 24 Aug 2010 11:19:06 +0800 >> Cc: gdb-patches@sourceware.org, brobecker@adacore.com >> >> >> +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. >> > >> > Rephrase: >> > >> > 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. >> > >> > Btw, you didn't answer my question what is a "node without function >> > name". Because of this, I'm not sure the above text I suggest is >> > correct. Please explain more about this. >> >> It like the line, if this address doesn't have the debug message, it >> will not have the function name. > > When would a function lack debug info? in a stripped executable? If > so, what would "record pic" produce for functions that cannot be found > in the symbol table, when hide-nofunction is OFF? When inferior exec into a libc, it will lack debug info. If without debug info and "hide-nofunction is OFF", record pic will show address directly. > >> >> +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. >> > ^^^^^^^^^^^^^^^^^^ >> > "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. > > I'm confused. You say that when "set record pic function" is in > effect, each node of the VCG file will be a function. Now you are > saying that each line "will be a special note". What note? and how is > this different from "set record pic line"? Sorry I make a mistake. I just think you ask about "set record pic line". When "set record pic line",each line will be a special note. When "set record pic function", just show the function as a note, it will not show the line. > > Maybe you could show a fragment of the produced VCG file under each > option and command, so I could understand what is the effect of each > one of them, and suggest the appropriate text for the manual. > >> >> +@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. >> > >> > I still don't understand what this means. Will only the function >> > nodes hidden? If so, do you mean that the saved nodes will represent >> > lines, but there will be no nodes that represent functions? How 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 = get_pc_function_start (addr); >> if (addr == 0) >> { >> if (record_pic_hide_nofunction) >> goto exec; >> When we try to get the function start address. >> function = lookup_minimal_symbol_by_pc (addr); >> if (!function && record_pic_hide_nofunction) >> goto exec; >> And the find the function's name. > > This seems to say that hide-nofunction affects the situations where we > cannot get the function's address, or couldn't find its entry in the > symtab. Is that right? Is this option effective only for such > functions? If so, what will be produced in the VCG file when a > function has no address or is not in the symtab, but hide-nofunction > is OFF? Show a address in the note. > > Again, a fragment from the file for each possibility would be great to > explain to me what to write in the manual. > >> >> +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. >> > >> > Please replace the last sentence with this: >> > >> > Each node will show its instruction count in the form >> > @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. > > Then please don't tell this as part of describing hide-sameaddr OFF. > Describe it separately, to avoid the impression that hide-sameaddr > somehow affects the i:NUM display. hide-sameaddr OFF, show i:NUM. hide-sameaddr On, show c:COUNT. > >> I make a new one. please help me review it. > > I will wait with the rest of the review until I understand the issues > better, according to your answers to the above questions. Best, Hui ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-25 2:28 ` Hui Zhu @ 2010-08-27 14:40 ` Joel Brobecker 2010-08-27 15:50 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Joel Brobecker @ 2010-08-27 14:40 UTC (permalink / raw) To: Hui Zhu; +Cc: Eli Zaretskii, gdb-patches Hi Eli - Just a friendly ping... Also, sorry to be such a pest, but since this is dragging so long, and I can't really tell whether we're really all that close or not, I'd like to discuss the possibility of shipping a 7.2 with a less- than-perfect version of the doc for that part of the functionality (and get this properly finished in head and 7.2). I personally think that the delay on the 7.2 is getting ridiculous given the reason for that delay. I don't mind the delays when it's because of functional issues, but we're only 4 weeks away from the original schedule which we had decided to advance by 3-4 months (note: part of the delay is attributable to me letting things slip while disappearing from the face of the planet - I will not let that happen again). -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-27 14:40 ` Joel Brobecker @ 2010-08-27 15:50 ` Eli Zaretskii 2010-08-27 15:58 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2010-08-27 15:50 UTC (permalink / raw) To: Joel Brobecker; +Cc: teawater, gdb-patches > Date: Fri, 27 Aug 2010 07:39:46 -0700 > From: Joel Brobecker <brobecker@adacore.com> > Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org > > Hi Eli - Just a friendly ping... > > Also, sorry to be such a pest, but since this is dragging so long, > and I can't really tell whether we're really all that close or not, > I'd like to discuss the possibility of shipping a 7.2 with a less- > than-perfect version of the doc for that part of the functionality > (and get this properly finished in head and 7.2). I'm sorry, but the last version is still far from even being less-than-perfect. I cannot in good faith let users read such documentation. And what if the FSF decides to print this version of the manual and sell it as a book? I still feel that I'm somewhat in the dark regarding some of the issues, which does not let me suggest the correct wording. Some questions I asked were left with no answer, and my suggestion to show fragments of the VCG file created by the various options remained a suggestion. If someone wants to help by explaining this stuff better, that would be most welcome. Anyway, I will try to rewrite the last version using the information that Hui did provide in response to my questions. I hope I will be able to do that. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-27 15:50 ` Eli Zaretskii @ 2010-08-27 15:58 ` Joel Brobecker 2010-08-28 1:15 ` Hui Zhu 0 siblings, 1 reply; 18+ messages in thread From: Joel Brobecker @ 2010-08-27 15:58 UTC (permalink / raw) To: Eli Zaretskii; +Cc: teawater, gdb-patches > I'm sorry, but the last version is still far from even being > less-than-perfect. I cannot in good faith let users read such > documentation. And what if the FSF decides to print this version of > the manual and sell it as a book? Hmm, that's a good point :-(. Well, we'll just have to be patient. BTW: Just to make it clear, this was not an appreciation of your reviewing work; I think you're doing a great job helping everyone with their documentation patch. It's just that in this particular case, with distance and English issues, the process is very slow and there is nothing much we can do about it (hence the not-so-good suggestion). Like Andrew used to say: Everything takes a week on the internet. -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-27 15:58 ` Joel Brobecker @ 2010-08-28 1:15 ` Hui Zhu 2010-08-28 1:24 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Hui Zhu @ 2010-08-28 1:15 UTC (permalink / raw) To: Joel Brobecker; +Cc: Eli Zaretskii, gdb-patches Hi guys, I am so sorry that this patch affect the release too much. If you don't mind, I suggest it delay until after 7.2 release. Thanks, Hui On Fri, Aug 27, 2010 at 23:58, Joel Brobecker <brobecker@adacore.com> wrote: >> I'm sorry, but the last version is still far from even being >> less-than-perfect. I cannot in good faith let users read such >> documentation. And what if the FSF decides to print this version of >> the manual and sell it as a book? > > Hmm, that's a good point :-(. Well, we'll just have to be patient. > > BTW: Just to make it clear, this was not an appreciation of your > reviewing work; I think you're doing a great job helping everyone > with their documentation patch. It's just that in this particular > case, with distance and English issues, the process is very slow > and there is nothing much we can do about it (hence the not-so-good > suggestion). Like Andrew used to say: Everything takes a week on > the internet. > > -- > Joel > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-28 1:15 ` Hui Zhu @ 2010-08-28 1:24 ` Joel Brobecker 2010-09-01 18:21 ` Michael Snyder 0 siblings, 1 reply; 18+ messages in thread From: Joel Brobecker @ 2010-08-28 1:24 UTC (permalink / raw) To: Hui Zhu; +Cc: Eli Zaretskii, gdb-patches > If you don't mind, I suggest it delay until after 7.2 release. Unfortunately, as Eli explained: Unless we take that piece of functionality out, we can't. -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-08-28 1:24 ` Joel Brobecker @ 2010-09-01 18:21 ` Michael Snyder 2010-09-01 18:28 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Michael Snyder @ 2010-09-01 18:21 UTC (permalink / raw) To: Joel Brobecker; +Cc: Hui Zhu, Eli Zaretskii, gdb-patches Joel Brobecker wrote: >> If you don't mind, I suggest it delay until after 7.2 release. > > Unfortunately, as Eli explained: Unless we take that piece of > functionality out, we can't. Hui, any progress on this? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-09-01 18:21 ` Michael Snyder @ 2010-09-01 18:28 ` Joel Brobecker 2010-09-01 23:04 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Joel Brobecker @ 2010-09-01 18:28 UTC (permalink / raw) To: Michael Snyder; +Cc: Hui Zhu, Eli Zaretskii, gdb-patches > >Unfortunately, as Eli explained: Unless we take that piece of > >functionality out, we can't. > > Hui, any progress on this? Hui: With your permission, I wold like to take this patch over. -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-09-01 18:28 ` Joel Brobecker @ 2010-09-01 23:04 ` Joel Brobecker 2010-09-02 1:21 ` Joel Brobecker 0 siblings, 1 reply; 18+ messages in thread From: Joel Brobecker @ 2010-09-01 23:04 UTC (permalink / raw) To: Michael Snyder; +Cc: Hui Zhu, Eli Zaretskii, gdb-patches > Hui: With your permission, I wold like to take this patch over. Here is, in short, what I have found out from reverse-engineering the code. That should allow me to write some half-decent documentation for this feature. However, before you read on, and before I do so, I would like to recommend that this feature be actually backed out. More about this in the appropriate thread. ------------------------------------------------------------------------- This feature produces a graph description using the VCG syntax. Graphs essentially have two elements: nodes and edges (the edges connect one node to the next). Notations: `[source name]' means optional source name `<source name>' means mandatory source name There are 3 types of edges: - Edges that correspond to a function call (drawn in red) - Edges that correspond to a function return (drawn in blue) - All other edges (drawn in the default color, I assume black) In the VCG file, the edges are written as: edge: {[color:<red|blue>] sourcename: "<from>" target_name: "<to>"} There are two kinds of nodes. Only one kind gets used for a given graph. Which kind is used is determined by the user setting "set record pic type <line|function>". Nodes have a `title', which is displayed in the node contents by the viewers. - Nodes associated to functions [filename-if-available] <function linkage name|function addr> - Nodes associated to source lines either: (a) <filename>:<line> [function linkage name] <addr> or: (b) [function linkage name] [line number] <addr> (a) is used in the case when the new instruction corresponds to a different frame from the previous instruction (either a function call or a return) AND when the new instruction has a symtab (debug info) (b) is used otherwise. The `function linkage name' is provided when known. WARNING: The code only checks the symbol table, and ignores debugging info. This is a problem on platforms where the linker eliminates static functions. The line number is provided if known (symtab). This is the case where we have debugging info, but it's still in the same frame. Effect of the various user settings: - set record pic hide-nofunction <on|off> If set to on, then nodes associated to instructions for which we cannot find a function in the symbol table are not included in the graph. - set record pic hide-nosource <on|off> If on, filters out the nodes associated to instructions for which no debugging information is available (typically, code compiled without debugging information, or code that got stripped). - set record pic hide-sameaddr <on|off> If on, nodes corresponding to the same address get merged. For "function" graphs, the merging stops as soon as the associated function returns. For line graphs, the merging is always done. The number of nodes being merged is indicated at the end of the node title as c:<N> where <N> is the number of times this node was found. If off, nodes are not merged. Instead of the cound, the intruction number, whetever that might be, is indicated at the end of the node title as i:<N> where <N> is that instruction number. -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFA/DOC] record pic 2010-09-01 23:04 ` Joel Brobecker @ 2010-09-02 1:21 ` Joel Brobecker 0 siblings, 0 replies; 18+ messages in thread From: Joel Brobecker @ 2010-09-02 1:21 UTC (permalink / raw) To: Michael Snyder; +Cc: Hui Zhu, Eli Zaretskii, gdb-patches > Here is, in short, what I have found out from reverse-engineering > the code. That should allow me to write some half-decent documentation > for this feature. However, before you read on, and before I do so, > I would like to recommend that this feature be actually backed out. > More about this in the appropriate thread. URL: http://www.sourceware.org/ml/gdb-patches/2010-09/msg00073.html -- Joel ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2010-09-01 23:19 UTC | newest] Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-07-01 7:12 [RFA/DOC] record pic Hui Zhu 2010-07-01 17:31 ` Eli Zaretskii 2010-07-02 6:29 ` Hui Zhu 2010-08-20 9:22 ` Eli Zaretskii 2010-08-23 8:26 ` Hui Zhu 2010-08-23 16:35 ` Eli Zaretskii 2010-08-24 3:19 ` Hui Zhu 2010-08-24 17:22 ` Eli Zaretskii 2010-08-25 2:28 ` Hui Zhu 2010-08-27 14:40 ` Joel Brobecker 2010-08-27 15:50 ` Eli Zaretskii 2010-08-27 15:58 ` Joel Brobecker 2010-08-28 1:15 ` Hui Zhu 2010-08-28 1:24 ` Joel Brobecker 2010-09-01 18:21 ` Michael Snyder 2010-09-01 18:28 ` Joel Brobecker 2010-09-01 23:04 ` Joel Brobecker 2010-09-02 1:21 ` Joel Brobecker
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).