This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Instrument gcc
- From: "Bingfeng Mei" <bmei at broadcom dot com>
- To: "Vincent R." <forumer at smartmobili dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 24 Feb 2009 07:43:08 -0800
- Subject: RE: Instrument gcc
- References: <e13426e1efe1237e47c0e2b42c80fb1c@mail.smartmobili.com>
Did you compile with -O0? A function may be inlined and a symbol may be optimized away with -O1 and above.
Bingfeng
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On
> Behalf Of Vincent R.
> Sent: 24 February 2009 15:38
> To: gcc@gcc.gnu.org
> Subject: Instrument gcc
>
> 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.
>
> Thanks
>
>
>