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: Instrument gcc


On Tue, 24 Feb 2009 16:43:08 +0100, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Feb 24, 2009 at 4:38 PM, Vincent R. <forumer@smartmobili.com>
> wrote:
>> Hi,
>>
>> even if I am simple mortal I would like to understand or at least follow
>> what is going on with gcc.
>> Generally when I run gdb and try to breakpoint inside a function I get a
>> undefined symbol or something like that.
>> I suppose this is because gcc is not a simple static exe but depends on
>> other binaries (g++, cpp, ...).
>> So my question is how can I debug step by step gcc ?
>> Let's say for instance I want to breakpoint the function
>> init_exception_processing located in gcc/gcc/cp
>> and related to c++ exceptions
>>
>> This GDB was configured as "i486-linux-gnu"...
>> (gdb) b init_exception_processing
>> Function "init_exception_processing" not defined.
>> Make breakpoint pending on future shared library load? (y or [n])
>>
>> What is the magical trick to be able to follow what is going on.
> 
> You are probably debugging the driver - try debugging the compiler
> (called cc1, cc1plus).  The command-line is printed if you execute
> gcc with the extra -v switch.
> 
> Richard.

And what if I want to debug a cross compiler, there is no cc1 or cc1plus
with the toolchain I use:

arm-mingw32ce-addr2line
arm-mingw32ce-ar
arm-mingw32ce-as
arm-mingw32ce-c++
arm-mingw32ce-c++filt
arm-mingw32ce-cpp
arm-mingw32ce-dlltool
arm-mingw32ce-g++
arm-mingw32ce-gcc
arm-mingw32ce-gcc-4.4.0
arm-mingw32ce-gccbug
arm-mingw32ce-gcov
arm-mingw32ce-gprof
arm-mingw32ce-ld
arm-mingw32ce-nm
arm-mingw32ce-objcopy
arm-mingw32ce-objdump
arm-mingw32ce-ranlib
arm-mingw32ce-readelf
arm-mingw32ce-size
arm-mingw32ce-strings
arm-mingw32ce-strip
arm-mingw32ce-windmc
arm-mingw32ce-windres




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