OSDN Git Service

Check library name rather than member name when rereading symbols.
authorbrobecke <brobecke>
Tue, 27 Apr 2010 21:01:30 +0000 (21:01 +0000)
committerbrobecke <brobecke>
Tue, 27 Apr 2010 21:01:30 +0000 (21:01 +0000)
commitbfe90ef89bc082c270170d84aa98f70a9f4e8c8f
treeb16e3dd5282a663820c2eb5f05ba611c952853b5
parent3b52c9cb92b7ba058961bc9f2326c1cab7d97224
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.
gdb/ChangeLog
gdb/symfile.c