Issue with Latest GDB on AIX with GCC-6.12

Nitish Kumar Mishra
Tue Feb 7 08:05:00 GMT 2017

Hi All !

As Pedro suggested to have some print statements in "catches" blocks
to identify the frame that can't be unwound, I did try that.
Most of the functions didn't have the try-catch except,
gdb_rl_callback_handler ()
gdb_rl_callback_read_char_wrapper ()
gdb_rl_callback_read_char_wrapper_noexcept (),
where I put the print statements but during execution none of these
print statements get executed.

In the function:
static void
 gdb_rl_callback_handler (char *rl) noexcept
   struct gdb_exception gdb_rl_expt = exception_none;
   struct ui *ui = current_ui;

       ui->input_handler (rl);
       gdb_rl_expt = ex;

I tried calling command_line_handler () without function pointer (as
it seems that it is a known issue with AIX and function pointers), but
again it didn't help.


On Tue, Jan 31, 2017 at 6:38 PM, Pedro Alves <> wrote:
> On 01/29/2017 01:11 AM, David Edelsohn wrote:
>> Note that std::terminate() is called specifically because there was an
>> unwind failure and no handler was found in in libsupc++
>> (part of libstdc++).
> Right, that's what makes it look like either an runtime unwinder,
> or unwind info bug.
>> Is this code trying to propagate an exception through a signal
>> handler, in which case GCC MD_FALLBACK_FRAME_STATE_FOR needs to be
>> tweaked to find more AIX kernel signal handler signatures.
> Nope, it's just normal C++ frames all the way from the throw to
> the "catch" that should catch the exception.
> (GDB stopped throwing from signal handlers before we flipped
> the C++ switch, with:
>  [PATCH 00/30] Stop throwing exceptions from signal handlers
> )
> I'd suggest progressively hacking in "catches" to frames
> closer to the throw in question helps identify the frame that
> can't be unwound.  Like, sprinkling in a few:
> try
>   {
>     ...
>   }
> catch (...)
>   {
>     printf ("%s:%d: got here\n", __FILE__, __LINE__)
>     throw;
>   }
> Thanks,
> Pedro Alves

More information about the Gdb mailing list