[Bug build/24805] gdb loses exported symbols if CFLAGS contain -fvisibility=hidden

nolange79 at gmail dot com sourceware-bugzilla@sourceware.org
Wed Dec 18 20:46:00 GMT 2019


--- Comment #3 from nolange79 at gmail dot com ---
(In reply to Tom Tromey from comment #2)
> Sorry about the delay on this.
> The gdb process is to send patches to the mailing list.
> See the contribution checklist:
> https://sourceware.org/gdb/wiki/ContributionChecklist

Given that I dont know about the gdb/glibc internals I would
have hoped for feedback and assumed that my patch will
be not much more than explaining the issue.

> Offhand this patch sounds like a reasonable idea to me.
> I wonder, though, what happens if glibc's proc service header
> is used instead.

First time about hearing that glibc having the same header.
I really don't see why you are supporting both an internal and
external header that necessarily need to be identical, in which occasions is
that a good idea?
(Which reiterates that I am likely not able to create a patch
that will be acceptable by you without alot back- and forth).

So we could:

1.   Fix both gdb and glibc header. Ugly inconsistencies with version mix&match

2.   Additional prototypes adding the visibility attribute (valid in C AFAIK).
     Doable, could place those at the end of the header covering both glibc and
internal header

3.   Add the visibility attribute to the function *definitions*. means usually
twice for gdb and gdbserver. Bad solution IMHO

4.   Use the visibility pragma in the header (push/pop). Similar to the EXTERNC

I am leaning towards 4 now (short of my favorite #5: drop using the glibc
header completely)

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list