From: Hui Zhu <teawater@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, brobecker@adacore.com
Subject: Re: [RFA/DOC] record pic
Date: Wed, 25 Aug 2010 02:28:00 -0000 [thread overview]
Message-ID: <AANLkTik5VX7LNtsb4J=iY_gMCXE+a5ymDB=X5y0sEnJV@mail.gmail.com> (raw)
In-Reply-To: <8339u3ordt.fsf@gnu.org>
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
next prev parent reply other threads:[~2010-08-25 2:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 7:12 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTik5VX7LNtsb4J=iY_gMCXE+a5ymDB=X5y0sEnJV@mail.gmail.com' \
--to=teawater@gmail.com \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).