From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10935 invoked by alias); 25 Aug 2010 02:28:15 -0000 Received: (qmail 10922 invoked by uid 22791); 25 Aug 2010 02:28:14 -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 X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Aug 2010 02:28:08 +0000 Received: by qwf7 with SMTP id 7so82474qwf.0 for ; Tue, 24 Aug 2010 19:28:06 -0700 (PDT) Received: by 10.224.65.169 with SMTP id j41mr5068754qai.154.1282703286223; Tue, 24 Aug 2010 19:28:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.20.12 with HTTP; Tue, 24 Aug 2010 19:27:46 -0700 (PDT) In-Reply-To: <8339u3ordt.fsf@gnu.org> References: <83fx039kel.fsf@gnu.org> <83y6c1prnh.fsf@gnu.org> <83hbilnv4n.fsf@gnu.org> <8339u3ordt.fsf@gnu.org> From: Hui Zhu Date: Wed, 25 Aug 2010 02:28: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/msg00428.txt.bz2 Thanks Eli. On Wed, Aug 25, 2010 at 01:24, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Tue, 24 Aug 2010 11:19:06 +0800 >> Cc: gdb-patches@sourceware.org, brobecker@adacore.com >> >> >> +set record pic hide-nofunction on|off >> >> + =A0The each line or each function will be show in vcg file as a nod= e. >> >> + =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. > > When would a function lack debug info? in a stripped executable? =A0If > 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. >> > =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. =A0Each line will be a special note. > > I'm confused. =A0You say that when "set record pic function" is in > effect, each node of the VCG file will be a function. =A0Now you are > saying that each line "will be a special note". =A0What 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. =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. =A0The node will be hide when: >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Get the start addr of function. = =A0*/ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 addr =3D get_pc_function_start (addr= ); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (addr =3D=3D 0) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (record_pic_hide_nofuncti= on) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto exec; >> When we try to get the function start address. >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 function =3D lookup_minimal_symbol_by_pc (ad= dr); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!function && record_pic_hide_nofunction) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 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. =A0Is that right? =A0Is this option effective only for such > functions? =A0If 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. =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. > > 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. =A0please 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