cazy <ad319min@xxxxxxxxx> writes: > when gcc compiling *.c , I want to add my code into the original source file > show as fellow : > > int foo() > { > my_function_begin; > first statement; > … > last statement; > my_function_end; > } Look at the -finstrument-functions option. That may be sufficient for your purposes. If not, it should in any case serve as a guide for what parts of gcc you need to change. Ian