diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-objfile.exp | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4a903bc..fa7ffa9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-13 Doug Evans <dje@google.com> + + * gdb.python/py-objfile.exp: Test gdb.lookup_objfile on symlinked + binary. + 2015-01-13 Joel Brobecker <brobecker@adacore.com> * Makefile.in (clean mostlyclean): Do not delete *.py. diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp index 50339a6..cddbd3d 100644 --- a/gdb/testsuite/gdb.python/py-objfile.exp +++ b/gdb/testsuite/gdb.python/py-objfile.exp @@ -115,3 +115,14 @@ if { [get_python_valueof "sep_objfile.build_id" "None"] != "None" } { gdb_test "python print (gdb.lookup_objfile (sep_objfile.build_id, by_build_id=True))" \ "Objfile not found\\.\r\n${python_error_text}" } + +# An objfile that was a symlink to a differently named file is still +# findable with its original name. +set symlink_binary [standard_output_file "symlink-binary"] +remote_exec host "rm -f ${symlink_binary}" +remote_exec host "ln -sf ${testfile} ${symlink_binary}" +if [remote_file host exists "${symlink_binary}"] { + clean_restart "${symlink_binary}" + gdb_test "python print (gdb.lookup_objfile (\"${symlink_binary}\").filename)" \ + "${testfile}" "gdb.lookup_objfile of symlinked binary" +} |