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: 'recording' program execution.


> What I'd prefer is a compiler flag that does basically the same thing,
> ie: puts hooks in the code such that after each step, a special, user
> defined function is called which takes as an argument the relevant
> source code that is to be executed (and whether or not a subroutine is
> being exited or entered), and lets the user do whatever they want with
> it.

Hi,


have a look at the flag -finstrument-functions for gcc. It does basically
what you want, though only for function calls and returns. It does not
hook every instruction IN a function.


Tim



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