Re: [PATCH] always export the symbols for the proc_service interface

Tom Tromey
2020-01-06T16:07:06Z

>>>>> "Norbert" == Norbert Lange <nolange79@gmail.com> writes:

Norbert> Compiling GDB with '-fvisibility=hidden' will remove the
Norbert> symbols that should be exported.
Norbert> This patch explicitly marks them as visible.

Norbert> gdb/ChangeLog

Norbert> PR build/24805
Norbert> * gdbsupport/gdb_proc_service.h: push/pop visibility
Norbert> attribute for exported functions.

Thanks for the patch.

I have one question and one comment.

Norbert> +++ b/gdb/gdbsupport/gdb_proc_service.h
Norbert> @@ -23,6 +23,11 @@

Norbert> #ifdef HAVE_PROC_SERVICE_H

Norbert> +/* ensure the symbols are public, even if the default is hidden */

In the gdb style, comments should be complete sentences, which end in a
period followed by 2 spaces. So this should read:

/* Ensure the symbols are public, even if the default is hidden. */

Norbert> +#if __GNUC__ >= 4
Norbert> +#pragma GCC visibility pop
Norbert> +#endif

Would it be better to just have this done a single time at the top and
bottom of the file?

thanks,
Tom