[Bug gdb/21240] arm-none-eabi-gdb crashes on start

qiyao at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Fri Apr 7 13:56:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21240

--- Comment #8 from Yao Qi <qiyao at gcc dot gnu.org> ---
It turns out a libgcc issue.  If C++ program is linked with -static-libgcc and
throws exception, it won't be caught.

$ cat test.cpp 

int main()
{
        try
        {
            throw 0;
        }
        catch (...)
        {
        }

        return 0;
}

$ /opt/local/bin/g++ -static-libgcc test.cpp -o test.exe
$ ./test.exe 
Abort trap: 6
$ /opt/local/bin/g++ --version
g++ (MacPorts gcc5 5.4.0_0) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list