Re: using gcc's lexer/parser (was: Re: 'recording' program execution.)

2008-11-03 Thread Ian Lance Taylor
"Edward Peschko" <[EMAIL PROTECTED]> writes: > wrt the below, I was giving it some thought, and was wondering how > usable the gcc lexer/parser combo was by itself, how 'pluggable' it > was - my hope was that I could take the lexer/parser and instead of > making an executable out of the incoming c

using gcc's lexer/parser (was: Re: 'recording' program execution.)

2008-11-02 Thread Edward Peschko
ok, wrt the below, I was giving it some thought, and was wondering how usable the gcc lexer/parser combo was by itself, how 'pluggable' it was - my hope was that I could take the lexer/parser and instead of making an executable out of the incoming code, I could transform the code in place, ie: add

Re: 'recording' program execution.

2008-10-31 Thread Edward Peschko
Richard, Thanks for the info... I'll try it out - I'm assuming that what you get out of this is very similar to what you get out of dtrace when you instrument a pid on entry and return.. Having a full trace is very helpful in tracking things down. I'd like to go further in c code even than what I

Re: 'recording' program execution.

2008-10-31 Thread Richard Guenther
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 i

Re: 'recording' program execution.

2008-10-31 Thread wuxi
[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 too

Re: 'recording' program execution.

2008-10-31 Thread muenchen
> 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 exit