static linking of gdb

Bernd Edlinger bernd.edlinger@hotmail.de
Mon Apr 6 03:27:10 GMT 2020



On 4/5/20 3:17 PM, Eli Zaretskii wrote:
>> From: Bernd Edlinger <bernd.edlinger@hotmail.de>
>> Date: Sun, 5 Apr 2020 12:13:42 +0200
>>
>> I noticed that gdb is currently not
>> linking libstdc++ statically, as it did
>> in the past if I remember correclty.
> 
> You need to request that by passing --with-static-standard-libraries
> to the configure script.  Note that if you do that, you may encounter
> an error at configure time, because the configure script thinks the
> above option is incompatible with source-highlight library (without
> checking whether a static version of that library is available).  This
> was reported here:
> 
>   https://sourceware.org/pipermail/gdb-patches/2020-February/165843.html
> 
> but AFAIK was not fixed yet.
> 

But when I follow this pointer,
I end up here:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-08/msg00287.html

> gdb should normally not be linked with -static-libstdc++.  Currently
> this has not caused problems, but it's incompatible with catching an
> exception thrown from a shared library -- and a subsequent patch
> changes gdb to do just this.

Now this makes me a bit nervios.

Tom can you explain where this might happen?
In general I don't think that throwing and catching
exceptions makes a good design, please dont take that personally,
but throwing exceptions of a shared library looks like hazard to me.


Thanks
Bernd.


More information about the Gdb-patches mailing list