Hello,
I'm using *gcc4.9 sh4 toolchain* from
http://download.si-linux.co.jp/debian-sh/jessie-sh4/toolchain-amd64/gcc-4.9/
, During testing I have found that libstdc++ is not handling exception
and program receives *SIGABRT* signal.
sample program is below.
int div(int a,int b)
{
if(b==0)
throw "divided by zero..";
else
return (a/b);
}
int main()
{
int x=20 ,y = 0;
try
{
int z;
z=div(x,y);
cout<<"result="<<z<<endl;
}
catch (const char *p)
{
cout<<p<<endl;
}
return 0;
}
I'm compiling this sample code using *sh4-linux-gnu-g++ -o test test.cpp*.
So, Anyone have idea why this happening?
--
Regards,
Rahul R Dhobi,
System Level Solutions (I) Pvt. Ltd.