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: Question about modifying gcc


On Thu, Jun 05, 2008 at 12:55:17PM -0700, dreese@vandals.uidaho.edu wrote:

> I am attempting to modify the compiler to instrument function calls and
> returns. The end result that i am trying to achieve is to send the
> address of every called function to a memory mapped file prior to the
> call and after the call send an immediate value to that same file. The
> target architecture is x86.

You should be able to achieve what you want without modifying the
compiler.  Check the manual for the the -finstrument-functions option.

There's also the existing coverage support: compile with -ftest-coverage
-fprofile-arcs, then run gcov.


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