From: Larry Evans <cppljevans@suddenlink.net>
To: gcc@gcc.gnu.org
Subject: howto graphically view .cfg file produced by -fdump-tree-cfg
Date: Sun, 08 Nov 2009 23:09:00 -0000 [thread overview]
Message-ID: <hd7j37$vc0$1@ger.gmane.org> (raw)
http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options
describes -fdump-tree-SWITCH
where SWITCH may be one of a number of "switches" including:
cfg
vcg
I tried the vcg switch; however, it looks like that's just the control
flow for basic block. The cfg switch looks similar except it
prefixes the control flow for each function with the function
name. In addition, calls in the function appear as the actual
function name called with possibly some generated variable
names as argument and result. For example, the output from
compile of cp/pt.c with -fdump-tree-cfg contains:
instantiate_class_template (type)
{
...
}
and within the ..., there's:
union tree_node * D.76307;
union tree_node * type.1598;
...
type.1598 = type;
D.76307 = most_specialized_class (type.1598, templ);
which I think corresponds to the obvious line in:
/* Figure out which template is being instantiated. */
templ = most_general_template (CLASSTYPE_TI_TEMPLATE (type));
gcc_assert (TREE_CODE (templ) == TEMPLATE_DECL);
/* Determine what specialization of the original template to
instantiate. */
t = most_specialized_class (type, templ);
if (t == error_mark_node)
of pt.c around line 7371 (viewable here:
http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=153977&view=markup
)
Does someone know of a way to view this in a graphical way,
somewhat like what xvcg does for its cfg's?
TIA.
-Larry
next reply other threads:[~2009-11-08 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-08 23:09 Larry Evans [this message]
2009-11-14 19:30 ` Diego Novillo
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='hd7j37$vc0$1@ger.gmane.org' \
--to=cppljevans@suddenlink.net \
--cc=gcc@gcc.gnu.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).