Re: Issue with Latest GDB on AIX with GCC-6.12

David Edelsohn <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAGWvnyn0dfXfP8z+G0DFf4JWBZMXreetzg3+xX8_+7LYTmgw6Q@mail.gmail.com>
>>>>> Pedro Alves writes:

> Sounds like a manifestation of:
>
>  Bug 60939 - AIX: exceptions not caught when calling function via pointer
>  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60939
>
> since ui->input_handler is a function pointer here:
>
> static void
> gdb_rl_callback_handler (char *rl) noexcept
> {
>   struct gdb_exception gdb_rl_expt = exception_none;
>   struct ui *ui = current_ui;
>
>   TRY
>     {
>       ui->input_handler (rl);
>     }
>   CATCH (ex, RETURN_MASK_ALL)
>     {
>       gdb_rl_expt = ex;
>     }
>   END_CATCH

If the problem is throwing an exception through a function called via
pointer, then the solution should be to follow the suggestion in
comment #8 and add an appropriate incantation of

-Wl,-bkeepfile:

to the link step for GDB, something like

gdb/config/powerpc/aix.mh
MH_LDFLAGS = -Wl,-bkeepfile:event-top.o

Thanks, David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.