On Fri, Oct 31, 2008 at 10:18 AM, wuxi <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> >> have a look at the flag -finstrument-functions for gcc. > > as far as I know, this could only record at function entry and return ? > > but sometimes recording all the "trace" of how program behaves is useful for > debugging purpose. > > further, using a binary instrumentation tool like PIN could only record the > low level instruction trace....
I would suggest to do the instrumentation in the frontends as there you still know the original statement boundaries. Note that the original program text may be not readily available there, so you might need to hack libcpp as well. Richard.