From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org, Tristan Gingold <gingold@adacore.com>
Subject: Re: [RFA/commit] Check library name rather than member name when rereading symbols.
Date: Wed, 21 Apr 2010 16:12:00 -0000 [thread overview]
Message-ID: <20100421161234.GC19194@adacore.com> (raw)
In-Reply-To: <201004211658.18223.pedro@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 413 bytes --]
> So, could you tweak the comment a bit while there? I'd suggest:
>
> /* 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. */
Absolutely - thanks for digging out the info. Here is an updated version...
--
Joel
[-- Attachment #2: symfile.diff --]
[-- Type: text/x-diff, Size: 2176 bytes --]
commit f747aae3d5099a7e4c294b2b62e10346e561a5a6
Author: Joel Brobecker <brobecker@adacore.com>
Date: Tue Apr 20 14:13:34 2010 -0400
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.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index eda26cc..d11069c 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2291,14 +2291,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)
{
next prev parent reply other threads:[~2010-04-21 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 15:18 Joel Brobecker
2010-04-21 15:40 ` Pedro Alves
2010-04-21 15:43 ` Tristan Gingold
2010-04-21 15:58 ` Pedro Alves
2010-04-21 16:12 ` Joel Brobecker [this message]
2010-04-27 21:06 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100421161234.GC19194@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=gingold@adacore.com \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox