summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-04-27 21:01:30 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-04-27 21:01:30 +0000
commit2c15637f6ebfb0907975549962722d003518a8d4 (patch)
treea89f8c0148a7be35b9b80cab007012fd04c093a7
parent3b26d0def772e7fd9f54a7fb7d26af595a179fd7 (diff)
downloadgdb-2c15637f6ebfb0907975549962722d003518a8d4.tar.gz
Check library name rather than member name when rereading symbols.
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 & Pedro Alves): * symfile.c (reread_symbols): Also search for file in libraries. Update comment. Tested on x86_64-darwin and x86_64-linux.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symfile.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 33ead663309..b84aa5d6146 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2010-04-27 Joel Brobecker <brobecker@adacore.com>
+ * symfile.c (reread_symbols): Also search for file in libraries.
+ Update comment.
+
+2010-04-27 Joel Brobecker <brobecker@adacore.com>
+
* configure.tgt: Treat x86-lynxos targets as x86 bareboard targets
in terms of configuration.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 4f70445c601..0528488c3cf 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2290,14 +2290,13 @@ 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 this object is from an archive (what you usually create with
+ `ar', often called a `static library' on most systems, though
+ a `shared library' on AIX is also an archive), then you should
+ stat on the archive 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)
{