Issue with Latest GDB on AIX with GCC-6.12

Pedro Alves palves@redhat.com
Wed Jan 25 11:12:00 GMT 2017


On 01/25/2017 10:54 AM, Nitish Kumar Mishra wrote:
> Hi,
> 
> The latest community gdb is not working with gcc 6.12, however, it
> works expectedly fine with GCC-4.8.5 on AIX platform.

What is gcc 6.12 ?

> #12 0x000000010007d994 in _ZL23gdb_rl_callback_handlerPc
> (rl=0x1100e92b0 "") at event-top.c:213

I only saw C++ frames up to here, and the exception should
be caught here.  I don't immediately see why that wouldn't
be working, though maybe it's the "noexcept"?  If you remove
that, does it fix it?  Maybe we need a level of indirection
here too, like in gdb_rl_callback_read_char_wrapper_noexcept
/ gdb_rl_callback_read_char_wrapper.


> We are trying some sample programs using readline library to propagate
> exceptions through callback handler just to check if we face any issue
> there. We are still working on it, can't say anything for sure.

Right, it's known that C++ exceptions can't cross readline (unless
built with -fexceptions)  See log of commits:

 89525768cd08 ("Propagate GDB/C++ exceptions across readline using sj/lj-based TRY/CATCH)
 2693a26216c3 ("Fix longjmp across readline w/ --enable-sjlj-exceptions toolchains")

But it looks like the mechanism to work around that isn't working for you.

> It seems like this is a issue regarding  exception propagation as
> eventually std::terminate() is getting called. Which also suggests
> that some how exceptions thrown is not getting handled properly.

Yes.

Thanks,
Pedro Alves



More information about the Gdb mailing list