This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING 2] [rfc]: Framework for looking up multiply defined global symbols in shared libraries
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: brobecker at adacore dot com (Joel Brobecker), gdb-patches at sourceware dot org (GDB Patches), drow at false dot org (Daniel Jacobowitz), kevinb at redhat dot com (Kevin Buettner), eliz at gnu dot org
- Date: Thu, 28 Jun 2007 14:44:42 +0200 (CEST)
- Subject: Re: [PING 2] [rfc]: Framework for looking up multiply defined global symbols in shared libraries
Markus Deuling wrote:
> diff -urN src/gdb/NEWS dev/gdb/NEWS
> --- src/gdb/NEWS 2007-06-21 19:00:43.000000000 +0200
> +++ dev/gdb/NEWS 2007-06-26 21:06:05.000000000 +0200
> @@ -3,6 +3,9 @@
>
> *** Changes since GDB 6.6
>
> +* New framework for looking up multiply defined global symbols from shared
> + libraries.
> +
It's up to Eli to approve NEWS entries, but it has been my understanding that
NEWS should be about user-visible features, not internal infrastructure changes.
I'd reword to this something like:
"When looking up multiply-defined global symbols, GDB will now prefer
the symbol definition in the current shared library if it was built
using the -Bsymbolic linker option."
I've noticed a couple of minor issues in the test case:
> diff -urN src/gdb/testsuite/gdb.base/libmd.c dev/gdb/testsuite/gdb.base/libmd.c
What is libmd supposed to stand for?
> --- src/gdb/testsuite/gdb.base/libmd.c 1970-01-01 01:00:00.000000000 +0100
> +++ dev/gdb/testsuite/gdb.base/libmd.c 2007-06-26 21:03:32.000000000 +0200
> +extern void foo();
This doesn't appear to be necessary; foo isn't even referred to ...
+void foo2 ();
Likewise.
> diff -urN src/gdb/testsuite/gdb.base/libmd.h dev/gdb/testsuite/gdb.base/libmd.h
> --- src/gdb/testsuite/gdb.base/libmd.h 1970-01-01 01:00:00.000000000 +0100
> +++ dev/gdb/testsuite/gdb.base/libmd.h 2007-06-26 21:03:32.000000000 +0200
In fact, this whole header file looks unnecessary to me.
> diff -urN src/gdb/testsuite/gdb.base/solib_symbol.c dev/gdb/testsuite/gdb.base/solib_symbol.c
> --- src/gdb/testsuite/gdb.base/solib_symbol.c 1970-01-01 01:00:00.000000000 +0100
> +++ dev/gdb/testsuite/gdb.base/solib_symbol.c 2007-06-26 21:03:32.000000000 +0200
> +extern void foo();
> +#include <stdio.h>
> +#include "libmd.h"
> +
> +extern void foo();
Here we have the declaration three times ;-) Once is enough ...
Otherwise, this looks OK to me now.
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com