public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB is broken on systems with readline built without -fexceptions
@ 2016-04-21 14:28 Pedro Alves
  2016-04-21 14:31 ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2016-04-21 14:28 UTC (permalink / raw)
  To: gdb

--enable-build-with-cxx=no is the workaround.

I'm testing a fix.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB is broken on systems with readline built without -fexceptions
  2016-04-21 14:28 GDB is broken on systems with readline built without -fexceptions Pedro Alves
@ 2016-04-21 14:31 ` Pedro Alves
  2016-04-21 16:32   ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2016-04-21 14:31 UTC (permalink / raw)
  To: gdb

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
 $ 

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB is broken on systems with readline built without -fexceptions
  2016-04-21 14:31 ` Pedro Alves
@ 2016-04-21 16:32   ` Pedro Alves
  0 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves @ 2016-04-21 16:32 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB is broken on systems with readline built without -fexceptions
  2019-02-12 19:35 ` Pedro Alves
@ 2019-02-13  3:01   ` Joel Brobecker
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2019-02-13  3:01 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Brian Vandenberg, gdb

> I'd suspect that this happens because GDB is built/linked with
> "-static-libstdc++ -static-libgcc", and that doesn't work
> correctly on Solaris.  ISTR that we observed that on other
> ports as well.

Indeed. It was on AIX, I believe.

-- 
Joel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB is broken on systems with readline built without -fexceptions
  2019-02-09  1:28 Brian Vandenberg
@ 2019-02-12 19:35 ` Pedro Alves
  2019-02-13  3:01   ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2019-02-12 19:35 UTC (permalink / raw)
  To: Brian Vandenberg, gdb

On 02/09/2019 01:28 AM, Brian Vandenberg wrote:
>     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
> 
> 

Note that the original problems that led to that "broken" above have
been fixed, a long while ago.

> 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)" \
>   {CFLAGS,CPPFLAGS,CXXFLAGS}=-isystem/opt/csw/include
> 
> I don't recall the rationale behind all of the above options.  Some of them came from how the folks at opencsw.org <http://opencsw.org> 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.

I'd suspect that this happens because GDB is built/linked with
"-static-libstdc++ -static-libgcc", and that doesn't work
correctly on Solaris.  ISTR that we observed that on other
ports as well.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB is broken on systems with readline built without -fexceptions
@ 2019-02-09  1:28 Brian Vandenberg
  2019-02-12 19:35 ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Vandenberg @ 2019-02-09  1:28 UTC (permalink / raw)
  To: gdb, Pedro Alves

>
> 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)" \
  {CFLAGS,CPPFLAGS,CXXFLAGS}=-isystem/opt/csw/include

I don't recall the rationale behind all of the above options.  Some of them
came from how the folks at opencsw.org 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.

-brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-13  3:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21 14:28 GDB is broken on systems with readline built without -fexceptions Pedro Alves
2016-04-21 14:31 ` Pedro Alves
2016-04-21 16:32   ` Pedro Alves
2019-02-09  1:28 Brian Vandenberg
2019-02-12 19:35 ` Pedro Alves
2019-02-13  3:01   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).