This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Intermediate code dump needed.


The gcc/g++ has options to dump the output of the traslation at 2 statges
1) After preprocessing
2) After assembly

quote - gcc man page --

 If you want only some of the four stages (preprocess, com-
 pile, assemble, link), you can use `-x' (or filename  suf-
  fixes)  to tell gcc where to start, and one of the options
 `-c', `-S', or `-E' to say where gcc  is  to  stop.   Note
  that  some  combinations (for example, `-x cpp-output -E')
instruct gcc to do nothing at all.

-S     Stop  after the stage of compilation proper; do not
              assemble.  The output is an assembler code file for
              each non-assembler input file specified.

              By default, GCC makes the assembler file name for a
              source file by replacing  the  suffix  `.c',  `.i',
              etc., with `.s'.  Use -o to select another name.

              GCC ignores any input files that don't require com-
              pilation.

       -E     Stop after the preprocessing stage; do not run  the
              compiler proper.  The output is preprocessed source
              code, which is sent to the standard output.

              GCC ignores input files which don't require prepro-
              cessing.



Look for more stuff in the man page.. Hope this helps.....


Regards,





Naveen Sharma, Noida wrote:
E04CF3F88ACBD5119EFE00508BBB2121025AF6B8@exch-01.noida.hcltech.com">
I think fdump-translation-unit should be useful for you.
 
-fdump-translation-unit (C and C++ only)

-fdump-translation-unit- number (C and C++ only)
 
Dump a representation of the tree structure for the entire translation unit to a file. The file name is made by appending `.tu' to the source file name. If the `-number' form is used, number controls the details of the dump as described for the `-fdump-tree' options.
 
Naveen.
-----Original Message-----
From: Jaswant [mailto:jaswant@msrvr.indofuji.soft.net]
Sent: Thursday, April 18, 2002 7:58 PM
To: gcc@gnu.org; help-gcc@gnu.org
Subject: Intermediate code dump needed.

 
Hi All,
 
I'm not sure what I'm asking makes sense, but just help me in it.
 
Is it possible to take dump of my 'C' program before RTL generation or any optimisation during compilation using gcc.
 
[Theoretically speaking output of semantic analysis]
 
regards,
Jaswant



____________________________________________________
  IncrediMail - Email has finally evolved - Click Here







-- 
                     /////
                  \\  - -  //
                   (  @ @ )
   -------------oOOo--(_)-oOOo-----------
   Sincerely yours,
   Ashish Gupta
   -----------------------Ooooo----------
                          (   )
                 ooooO     ) /
                 (   )    (_/
                  \ (
                   \_)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]