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: BUG: g++ 3.x.x -fomit-frame-pointer: exception handlingdoesn't work


On Tue, 2004-08-10 at 01:04, Denis Zaitsev wrote:
> > I never did get the first example to fail.
> It's very strange.  Did you use -O2?  The both examples utilize the
> same error...

Yes.

> navigation for me: where in GCC sources is the dwarf info (used for
> the exception handling) generated and emited into the object code?  I
> surely don't remember where I've found it last time.  And sources are
> _huge_...

Most of the dwarf2 code is in dwarf2out.c.  See for instance
output_call_frame_info.  There is various other except related stuff in
various other places.  except.c has general support for emitting code
for exception support.  The unwind* files contain runtime support code
for the stack unwinders.  libsupc++ contains the C++ library routines
for throwing and catching exceptions.

Since I can only reproduce the problem when gcc itself is compiled with
-fomit-frame-pointer, the problem could be that there are builtin
functions used by libsupc++ that only work when there is a frame
pointer.  If this is the case, then compiling that library with
-fno-omit-frame-pointer would solve the problem.  Alternatively, we can
figure out which builtin function requires the frame pointer, and modify
the gcc optimizer to ensure that there will be one when that builtin
function is used.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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