Difference: DebugCC1 (1 vs. 2)

Revision 22008-03-13 - ChenDing

Line: 1 to 1
 
META TOPICPARENT name="ProjectHome"
Changed:
<
<
Actually, gcc you called when you do compilation is just a driver for real compiler cc1, assembler as and linker collect2.
>
>
Actually, gcc you called when you do compilation is just a driver for real compiler cc1, assembler as and linker collect2. Use option -v you can see the exact command sequence. For direct debugging you should run gdb cc1. Refer to gdb documentation on how to set break points, print the current call stack, and examine variable values. You can modify variable values and call program functions within the debugger, making it a good test environment for trying your coding ideas.
 
Changed:
<
<
Use option -v in compilation, you may see something like following
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=generic -auxbase test -version -o /tmp/ccDwZexX.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/4.1.2/include
 /usr/include
End of search list.
GNU C version 4.1.2 20070925 (Red Hat 4.1.2-27) (i386-redhat-linux)
        compiled by GNU C version 4.1.2 20070925 (Red Hat 4.1.2-27).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129301
Compiler executable checksum: 53c9f9515bf7a4d930482540205071f7
 as -V -Qy -o /tmp/ccQmCBFO.o /tmp/ccDwZexX.s
GNU assembler version 2.17.50.0.12-4 (i386-redhat-linux) using BFD version 2.17.50.0.12-4 20070128
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. /tmp/ccQmCBFO.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o

Do debugging with the command which runs cc1.

-- XiaomingGu - 19 Feb 2008

>
>
Gcc has helper functions for examining the gimple tree. See the Q&A on examining an gimple node.
 \ No newline at end of file

Revision 12008-02-19 - XiaomingGu

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="ProjectHome"
Actually, gcc you called when you do compilation is just a driver for real compiler cc1, assembler as and linker collect2.

Use option -v in compilation, you may see something like following

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=generic -auxbase test -version -o /tmp/ccDwZexX.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/4.1.2/include
 /usr/include
End of search list.
GNU C version 4.1.2 20070925 (Red Hat 4.1.2-27) (i386-redhat-linux)
        compiled by GNU C version 4.1.2 20070925 (Red Hat 4.1.2-27).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129301
Compiler executable checksum: 53c9f9515bf7a4d930482540205071f7
 as -V -Qy -o /tmp/ccQmCBFO.o /tmp/ccDwZexX.s
GNU assembler version 2.17.50.0.12-4 (i386-redhat-linux) using BFD version 2.17.50.0.12-4 20070128
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. /tmp/ccQmCBFO.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o

Do debugging with the command which runs cc1.

-- XiaomingGu - 19 Feb 2008

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback