[llvm-objcopy] Use the full filename in --add-gnu-debuglink
authorAlexander Richardson <arichardson.kde@gmail.com>
Mon, 19 Feb 2018 19:53:44 +0000 (19:53 +0000)
committerAlexander Richardson <arichardson.kde@gmail.com>
Mon, 19 Feb 2018 19:53:44 +0000 (19:53 +0000)
commit6c85992c6da7ee88265e4ff7f69776b520d54891
treeb41e06d475201e6bf98b034d42ff90d5f2464076
parente60f1472f144be13170f072b160c39b34d731e6b
[llvm-objcopy] Use the full filename in --add-gnu-debuglink

Summary:
The current implementation was writing the file name without the extension
whereas GNU objcopy writes the full filename. With this change GDB will now
load the .debug file instead of silently ignoring it.

Reviewers: jakehehrlich, jhenderson

Reviewed By: jakehehrlich

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D43474

llvm-svn: 325528
llvm/test/tools/llvm-objcopy/add-gnu-debuglink.test
llvm/tools/llvm-objcopy/Object.cpp