Dear: TO Ian, Thanks for ur reply. >Ian wrote: > You can simply run "gcc -S -o /dev/null". There is no way to tell gcc > to not generate assembler code. But it sounds like you are going to > modify gcc anyhow, so you can do whatever you like. I want to make changes in GCC as small as possible even not. In my opinion, the variable no_backend should be effected by some command options which I haven't found. >Ian wrote: >If you are going to > use a plugin, just have the plugin call exit when you are done. I'am novice. Which function should I call in order to command the GCC exit with cleaning all related resource. Is plugin can directly call the non-static fucntion? Besides plugin section in onlinedoc, is there any more? Maybe this question should be applied to another mail list, but just one. Thanks a lot ;~) PANG Long 2009/6/18 Ian Lance Taylor <iant@xxxxxxxxxx>: > pang long <hitpanglong@xxxxxxxxx> writes: > >> I want to know how to disable the backend output by commond >> options or any way. I just want to run the analysis or optimization >> pass excluding generating asm or executable file output. This is >> because I am planning to implement some static analysis passes of GCC, >> and I just want to get the result of my own passes but all other >> further output such as final executable program. >> I find a static global variable no_backend in toplev.c(GCC 4.3.0 >> Core). It is defined in line1734:" no_backend = >> lang_hooks.post_options (&main_input_filename);" I have read the >> corresponding implementation "c_common_post_options" for language C, >> but I don't catch the corresponding commond options for GCC. Please >> give some hints. > > You can simply run "gcc -S -o /dev/null". There is no way to tell gcc > to not generate assembler code. But it sounds like you are going to > modify gcc anyhow, so you can do whatever you like. If you are going to > use a plugin, just have the plugin call exit when you are done. > > Ian >