HI, I wanna say thanks to everyone that help me.
My problem was find the correct path and the command line I will expose what I did to help someone that can have the same problem. I copied the files in my local path $ cp debug /usr/local/bin/ $ cp debugx /usr/local/bin/ after I just run the debugx (tip: the third arg is referent to my gcc binary, if put only gcc will debug the gcc installed in the system) $ debugx cc1 local/bin/gcc File.c To finish I added the break point (gdb) b toplev_main ( In my case, I was in emacs ). Thanks again, GPuglia On Mon, Apr 6, 2009 at 8:11 PM, Dave Korn <dave.korn.cyg...@googlemail.com> wrote: > Guilherme Puglia wrote: >> Hi! >> >> or better, hello again! I have posted a question (with my class friend >> Eduardo) about 2 or 3 weeks ago. My question was about the grammar >> wich gcc C front end use. > > Yeh! Hi again you guys :) > >> To solve my problem I wanna debug the C front end. I was trying to >> debug the gcc main function, toplev_main. Unfortunately, I can't >> insert a break point in this line. >> >> I saw the site http://gcc.gnu.org/wiki/DebuggingGCC and >> http://gcc.gnu.org/ml/gcc/2004-03/msg01195.html >> >> But I don't understand where is "my path". And how to insert the break point. > > Ok, sounds like you're not much familiar with using the shell? When it says > your path, it means the $PATH variable used to look for command-line > executables. About setting the breakpoint: if you're using gdb, the command > would be "b toplev_main", it's all in the manual. > > The main thing I'm not sure if you're fully aware of is that when you run > "gcc" at the command-line you're just invoking a simple driver program that > then invokes the preprocessor, compiler, assembler and linker as separate > processes, so you don't want to debug gcc itself. > > If you add "-v" to the gcc command-line, you will see (among other debug > info) the separate individual commands it issues to run these other processes. > You'll see that the first two commands both invoke "cc1" (or "cc1plus in C++) > - the first time, with the "-E" option to do the preprocessing on the source > file, the second time without "-E" to process the generated .i file. It's > that second command-line that you want to actually run under the debugger to > inspect the compilation process. > > > cheers, > DaveK > > -- -- "Never memorize something that you can look up." - Albert Einstein --