Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2002 11:47:44 -0400
From:      "Kevin B. Hendricks" <kevin.hendricks@sympatico.ca>
To:        dev@porting.openoffice.org, Martin Blapp <mb@imp.ch>, <openoffice@freebsd.org>
Cc:        <kan@freebsd.org>
Subject:   Re: [porting-dev] FreeBSD: Uncatched exception problem
Message-ID:  <200210101147.44472.kevin.hendricks@sympatico.ca>
In-Reply-To: <20021010135115.R15308-100000@levais.imp.ch>
References:  <20021010135115.R15308-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Martin,

I have learned to NOT trust all breakpoints being reported when hit.  I 
have seen the problem way to much (as least on ppc).  Also single stepping 
though an app may not always align with the source code (especially in C++ 
which has a tendency to put mutliple paths to reach implicit destrcutor 
calls that don't really exist in the source code.

So I take gdb with a big grain of salt when debugging at the source code 
level (especially C++ generated code).

Also,

Can you refresh my memory on how to recreate this bug on my own box?  I 
would like to add debug print statements right beofre the the intial throw 
and when that throw whould be caught to make sure the exception type is 
not the issue.

Kevin


> I'm again trying to solve this. A thing I do not understan is, that
> frame 4 shows __cxa_rethrow, but in single stepping I never hit it, and
> also the breakpoint I hit was not this one.
>
> Does this bring more light into this difficult bug ?
>
> #0  0x28c30d5b in kill () from /usr/lib/libc.so.5
> #1  0x28c8fa44 in abort () from /usr/lib/libc.so.5
> #2  0x28ba8c8f in __cxxabiv1::__terminate(void (*)())
> (handler=0x28c8f9d8 <abort>) at
> /usr/src/contrib/libstdc++/libsupc++/eh_terminate.cc:47
> #3  0x28ba8cd0 in __cxxabiv1::__unexpected(void (*)())
> (handler=0x8125e30) at
> /usr/src/contrib/libstdc++/libsupc++/eh_terminate.cc:57
> #4  0x28ba8c04 in __cxa_rethrow () at
> /usr/src/contrib/libstdc++/libsupc++/eh_throw.cc:77 #5  0x2aa36ac7 in
> SfxFrameLoader::detect(com::sun::star::uno::Sequence<com::sun::star::bea
>ns::PropertyValue>&) () from
> /usr/local/OpenOffice.org1.0/program//libsfx641fi.so
>
> Then I set a break for __cxa_rethrow and __cxa_throw.
>
> Breakpoint 1, __cxa_throw (obj=0x8128250, tinfo=0x2ab68dec,
>     dest=0x2aa38f2c
> <com::sun::star::lang::WrappedTargetRuntimeException::~WrappedTargetRunt
>imeException()>) at /usr/src/contrib/libstdc++/libsupc++/eh_throw.cc:58
> 58        __cxa_exception *header = __get_exception_header_from_obj
> (obj); Current language:  auto; currently c++
>
> (gdb) p obj
> $6 = (void *) 0x8128250
>
> (gdb) p *dest
> $5 = {void (
>     void *)} 0x2aa38f2c
> <com::sun::star::lang::WrappedTargetRuntimeException::~WrappedTargetRunt
>imeException()>
>
> (gdb) p *tinfo
> $2 = {_vptr$type_info = 0x28bbc668,
>   __name = 0x2ab554e0
> "N3com3sun4star4lang29WrappedTargetRuntimeExceptionE"}
>
> (gdb) n
> 59        header->exceptionType = tinfo;
> (gdb) n
> 60        header->exceptionDestructor = dest;
> (gdb) n
> 61        header->unexpectedHandler = __unexpected_handler;
> (gdb) n
> 62        header->terminateHandler = __terminate_handler;
> (gdb) n
> 63        header->unwindHeader.exception_class = __gxx_exception_class;
> (gdb) n
> 64        header->unwindHeader.exception_cleanup =
> __gxx_exception_cleanup; (gdb) n
> 66        __cxa_eh_globals *globals = __cxa_get_globals ();
> (gdb) n
> 0x28b7894c in _init () from /usr/lib/libstdc++.so.4
>
> __cxa_throw (obj=0x8128250, tinfo=0x2ab68dec,
>     dest=0x2aa38f2c
> <com::sun::star::lang::WrappedTargetRuntimeException::~WrappedTargetRunt
>imeException()>) at /usr/src/contrib/libstdc++/libsupc++/eh_throw.cc:67
> 67        globals->uncaughtExceptions += 1;
>
> (gdb) n
> 72        _Unwind_RaiseException (&header->unwindHeader);
> (gdb) n
> 0x28b777bc in _init () from /usr/lib/libstdc++.so.4
> (gdb) n
> Single stepping until exit from function _init,
> which has no line number information.
> __cxa_throw (obj=0x8128250, tinfo=0x2ab68dec,
>     dest=0x2aa38f2c
> <com::sun::star::lang::WrappedTargetRuntimeException::~WrappedTargetRunt
>imeException()>) at /usr/src/contrib/libstdc++/libsupc++/eh_throw.cc:76
> 76        __cxa_begin_catch (&header->unwindHeader);
>
> (gdb) n
> 0x28b782dc in _init () from /usr/lib/libstdc++.so.4
> (gdb) n
> Single stepping until exit from function _init,
> which has no line number information.
>
> Martin
>
> Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
> ------------------------------------------------------------------
> ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
> Phone: +41 061 826 93 00: +41 61 826 93 01
> PGP: <finger -l mbr@freebsd.org>
> PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
> ------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@porting.openoffice.org
> For additional commands, e-mail: dev-help@porting.openoffice.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-openoffice" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210101147.44472.kevin.hendricks>