Re: Creating a function dynamically

2009-11-12 Thread Taro Okumichi
Can anyone tell me what I am doing wrong. The compiler oututs __trace__int(0) instead of using the function parameter as an argument: _trace_f1(int a,int b) { __trace_int(a); ... Got the answer: I was missing DECL_ARG_TYPE(argdecl) = TREE_TYPE(param);

Creating a function dynamically

2009-11-11 Thread Taro Okumichi
I am hacking in the gcc code and come to a point where I cant come any further: I want to expand the -finstrument-functions to create a dynamic dump function in the background, instead of calling a fixed __cyg_profile_func_enter/exit I.e: if I have f1(int a,int b) { } I would like to create a