This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit] Check library name rather than member name when rereading symbols.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 21 Apr 2010 11:18:03 -0400
- Subject: [RFA/commit] Check library name rather than member name when rereading symbols.
Hello,
On Darwin, we have lots of complaints being emitted when restarting
a program:
(gdb) start
`a-except.o' has disappeared; keeping its symbols.
`unwind-dw2.o' has disappeared; keeping its symbols.
`s-except.o' has disappeared; keeping its symbols.
`s-traceb.o' has disappeared; keeping its symbols.
These object files are part of the GNAT runtime, and were never available.
The warning comes from the fact that we're checking whether the .o files
in the GNAT shared runtime have changed whereas we should be checking
whether the GNAT shared library itself has changed.
This patch implements this. Although it is really only useful on a platform
such as Darwin (debug info stored in .o files), we believe that this is
the right thing to do in general. This change should be a noop for all
the other platforms in any case.
gdb/ChangeLog (from Tristan Gingold):
* symfile.c (reread_symbols): Also search for file in libraries.
Tested on x86_64-darwin and x86_64-linux. Any thoughts on this?
---
gdb/symfile.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/gdb/symfile.c b/gdb/symfile.c
index eda26cc..2124419 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2291,14 +2291,12 @@ reread_symbols (void)
if (objfile->separate_debug_objfile_backlink)
continue;
-#ifdef DEPRECATED_IBM6000_TARGET
/* If this object is from a shared library, then you should
stat on the library name, not member name. */
if (objfile->obfd->my_archive)
res = stat (objfile->obfd->my_archive->filename, &new_statbuf);
else
-#endif
res = stat (objfile->name, &new_statbuf);
if (res != 0)
{
--
1.6.3.3