Anyone can help me with accessing CFG to build a mapping from statements to blocks? thanks
by Yanchun Wang
Hi everyone,
I am planning to generate a control flow graph from C functions, and need to know which block that each statement belongs to, that is the mapping from statements to blocks, or vice versa, any APIs or example available for now?
I have gone through the docs on the website but no luck to find something like this.
Any advice will be appreciated greatly. thanks.
Tony
8 years, 11 months
Error gcc4.9.1 compiling gcc-python-plugin
by hugo brunie
Hello,
I do not know if this issue has been treated yet, as I don't know how to
look for it efficiently in the mail archive.
I tried to compile the gcc-python-plugin following the instruction given
here: gcc-python-plugin.readthedocs.org
I use gcc 4.9.1, which I compiled myself.
When I compile with make plugin, errors appear when compiling
gcc-callgraph.c:
.
.
.
python xml-to-h.py
gcc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall
-I[...]/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/plugin/include
-I[...]/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/plugin/include/c-family -I.
-c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c
In file included from gcc-callgraph.c:29:0:
[...]/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/plugin/include/gimple.h:282:10:
error: use of enum ‘internal_fn’ without previous declaration
enum internal_fn GTY ((tag ("GF_CALL_INTERNAL"))) internal_fn;
I have several other errors of the same kind after this one.
Do you have any idea what has gone wrong ?
I looked for it a bit, and I found enum internal_fn declaration in
[...]/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/plugin/include/internal-fn.h
Hence I do not know why it can not find it.
Sorry for bothering you,
Best regards,
Hugo Brunie
8 years, 11 months