Enhance gdb.lookup_objfile so that it works with a symlinked binary.
authorDoug Evans <dje@google.com>
Wed, 14 Jan 2015 01:00:31 +0000 (17:00 -0800)
committerDoug Evans <dje@google.com>
Wed, 14 Jan 2015 01:02:53 +0000 (17:02 -0800)
commite02c96a79949824bbe1da22ddfc6b50d362fb552
tree8703c754cef937d9fd90c9224327bc81f729f9fa
parent8068939ab8058b48d0c7c318d463b0c6b85741fa
Enhance gdb.lookup_objfile so that it works with a symlinked binary.

gdb/Changelog:

* objfiles.c (objfile_filename): New function.
* objfiles.h (objfile_filename): Declare it.
(objfile_name): Add function comment.
* python/py-objfile.c (objfpy_lookup_objfile_by_name): Try both the
bfd file name (which may be realpath'd), and the original name.

gdb/testsuite/ChangeLog:

* gdb.python/py-objfile.exp: Test gdb.lookup_objfile on symlinked
binary.
gdb/ChangeLog
gdb/objfiles.c
gdb/objfiles.h
gdb/python/py-objfile.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-objfile.exp