On 20 July 2010 20:15, ranjith kumar <ranjithproxy@xxxxxxxxx> wrote: > Hi, > I am debugging gcc-4.5.0 source code, built for C compiler only, using gdb. > My question is why we can not keep break points on any of the back > end functions(functions defined in libbackend.a library)??? > > I am explaining my question in detail: > I downloaded gcc-4.5.0 and build it in objdir=OBJDIR and installed > into BIN directory. > when I run make install, it is copying xgcc file from OBJDIR to > BIN/usr/local/gcc. > > This is the command by which xgcc is built: > gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings > -Wcast-qual -Wstrict-prototypes -Wmissin g-prototypes > -Wmissing-format-attribute -pedantic -Wno-long-long > -Wno-variadic-macros -Wno-overlength-string s > -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -o > xgcc gcc.o opts-common.o gcc-options. o > gccspec.o intl.o prefix.o version.o driver-i386.o > ../libcpp/libcpp.a ../libiberty/libiberty.a . > ./libdecnumber/libdecnumber.a > > > So in building xgcc it is not using libbackend.a library. I think this > is the reason why I am unable to keep breakpoints on any of the back > end's functions.right? > But why xgcc is not built by using libbackend.a library? From where > xgcc/gcc is getting the backend functions definitions? > > Also what are cc,cc1-dummy files? They are built using libbackend.a library. > > Thanks in advance. > When debugging gcc you need to know what your debugging if your doing gdb on gcc your debugging the compiler driver but you want to check gcc -v for what the compiler proper is being executed as so for example you do gcc -v t.c is actually executing this: /usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1 -quiet -v Desktop/t.c -quiet -dumpbase t.c -mtune=generic -march=pentiumpro -auxbase t -version -o /tmp/cc8gLj3e.s so you run gdb --args /usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1 -quiet -v Desktop/t.c -quiet -dumpbase t.c -mtune=generic -march=pentiumpro -auxbase t -version -o /tmp/cc8gLj3e.s and you will be debugging the compiler check out this wiki link for more detail http://gcc.gnu.org/wiki/DebuggingGCC Hope this helps let us know if it solves your problem! --Phil