Re: [help] the process from c source file to generic structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> what parts of gcc you need to change.

I want to change(rewrite) the original source code when it process
"GENERIC PARSER"

This task confused me a lot, I've work on it for three days

As for as I know  the purpose of GENERIC is simply to provide a way of
representing an entire function in trees.

so in my opinion, adding my codes(example printf("the function
begins")) as a number of tree nodes into the original source tree
could achieve my task

But I do not know how, how GCC achieve the relationship between the
source code and generic tree?

Cazy : (


2010/5/29 Ian Lance Taylor <iant@xxxxxxxxxx>
>
> cazy <ad319min@xxxxxxxxx> writes:
>
> > when gcc compiling *.c , I want to add my code into the original source file
> > show as fellow :
> >
> > int foo()
> > {
> >     my_function_begin;
> >     first statement;
> >     …
> >    last statement;
> >     my_function_end;
> > }
>
> Look at the -finstrument-functions option.  That may be sufficient for
> your purposes.  If not, it should in any case serve as a guide for
> what parts of gcc you need to change.
>
> Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux