GDB is broken on systems with readline built without -fexceptions

Brian Vandenberg
Sat Feb 9 01:28:00 GMT 2019

> On 04/21/2016 03:31 PM, Pedro Alves wrote:
> > Forgot to qualify "broken".  The symptom is:
> >
> >  (gdb) whatever-command-that-causes-an-error
> >  terminate called after throwing an instance of
> 'gdb_exception_RETURN_MASK_ERROR'
> >  Aborted
> >  $
> >
> A proper fix is turning out to be more complicated than I'd hope,
> so in the mean time, to get things working again, I flipped gdb's
> TRY/CATCH mechanism back to setjmp/longjmp instead of C++ try/catch,
> again.
> You should no longer need the --enable-build-with-cxx=no workaround.
> Thanks,
> Pedro Alves

I'm still waiting for IT to get me the 8.2 source so I can try that
version, but in the meantime: I'm seeing this error in Solaris 10 (sparc)
with 8.1.1.  I built gdb configured like this:

/path/to/src/configure \
  --prefix=/install/path \
  --enable-plugins \
  --enable-tui \
  --with-python=yes \
  --disable-largefile \
  --without-system-readline \
  --enable-64-bit-bfd \
  --with-expat \
  --with-libexpat-prefix=/opt/csw \
  --with-x \
  LDFLAGS="$(echo -n -Wl,-{L,R}/opt/csw/lib)" \

I don't recall the rationale behind all of the above options.  Some of them
came from how the folks at build GDB, others were me just
banging on it until it compiled successfully (perhaps to my own detriment).

If you can offer any suggestions I would appreciate it.


More information about the Gdb mailing list