This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing function code from CFG


On 3/7/07, Paulo J. Matos <pocm@soton.ac.uk> wrote:
On 3/7/07, Diego Novillo <dnovillo@redhat.com> wrote:
> Paulo J. Matos wrote on 03/07/07 11:43:
>
> > What am I missing?
>
> You are debugging the wrong binary.  I'd suggest you browse through
> http://gcc.gnu.org/wiki/DebuggingGCC
>
> You need to debug one of cc1/cc1plus/jc1
>

Thank  you. It seems I've not found my error then. build_tree_cfg is
called 4 times before my pass. I guess it's one for each function I
have in my source file.

So, how come no bbs are created? Is there any other way to test where
the problem lies?


As a side note, if I instead try to access BBs through FOR_EACH_BB_FN I get the basic blocks I wanted. :) struct function *fdecl = DECL_STRUCT_FUNCTION(node->decl); basic_block bb; FOR_EACH_BB_FN(bb, fdecl) { printf("For each bb!\n"); }

This will print "For each bb!" a couple of times for each function.
Seems to be working this way around! :) heh!


--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK



--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]