This is the mail archive of the gcc-help@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: C++ exceptions


Hello gcc,

I'm working on a big project consisting of both C && C++ libraries.
The shared binary created out of these two libraries seems to be
having trouble with the exceptions. Exception handler i.e catch() is
not being dispatched by libstdc++ for some reason and the program is
terminating with SIGABRT as a result of it. Static binary seems to be
catching exceptions without any issues.
Some amount of googling on this topic suggested me to use
"-fexceptions" compiler switch but it didn't have any affect. Since
static binary works even without "-fexceptions" I think the issue has
nothing to do with "-fexceptions" compiler switch.  Just before
sigabrt I see these lines being printed by libstdc++. How do I debug
this issue ?

"terminate called after throwing an instance of 'ORBEM_AS_NotFound'

0xffffe524 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe524 in __kernel_vsyscall ()
#1  0xb7d55a40 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb7d57203 in __GI_abort () at abort.c:90
#3  0xb7f42195 in __gnu_cxx::__verbose_terminate_handler () at
../../../../../gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#4  0xb7f3feb5 in __cxxabiv1::__terminate (handler=0xb7f42050
<__gnu_cxx::__verbose_terminate_handler()>) at
../../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:40
#5  0xb7f3fef2 in std::terminate () at
../../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:50
#6  0xb7f401ae in __cxxabiv1::__cxa_throw (obj=0x16887c70,
tinfo=0xc860434 <typeinfo for ORBEM_AS_NotFound>, dest=0x9cea50
<ORBEM_AS_NotFound::~ORBEM_AS_NotFound()>)
    at ../../../../../gcc/libstdc++-v3/libsupc++/eh_throw.cc:83
#7  0x009a6145 in Config_Manager::Get_Client
(this=this@entry=0x168e8750, asId=...) at
orbs/server/Config_Manager.cpp:421
#8  0x009a6500 in Config_Manager::Add_Mod_Client (this=0x168e8750,
asId=..., asPasswd=...) at orbs/server/Config_Manager.cpp:514
#9  0x009af26a in set_config (orbs_data=orbs_data@entry=0x168b3ca8,
config_req=config_req@entry=0x16b42148, rsp=rsp@entry=0xbfffd0f8) at
orbs/server/ORBEM_Server.cpp:1248
#10 0x009b0685 in orbs_config_req_handler (h=0x16875f60,
data=0x168b3ca8) at orbs/orbs.cpp:821


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