summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Host
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-11-13 14:46:41 +0000
committeremaste <emaste@FreeBSD.org>2013-11-13 14:46:41 +0000
commite4ce3331e4e0dc2743bb848bb956fd3192260f74 (patch)
tree0f3d8a930c31bab5e6db5e6510619b3e6f817e6e /contrib/llvm/tools/lldb/source/Host
parentd965ae2aa7ac5223032993710985f1fb8486d8c7 (diff)
downloadFreeBSD-src-e4ce3331e4e0dc2743bb848bb956fd3192260f74.zip
FreeBSD-src-e4ce3331e4e0dc2743bb848bb956fd3192260f74.tar.gz
lldb: Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls. ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html Upstream defect pr17903 (http://llvm.org/pr17903) Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Host')
-rw-r--r--contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp b/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp
index 7189269..41f465a 100644
--- a/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp
+++ b/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp
@@ -61,9 +61,9 @@ Symbols::LocateExecutableSymbolFile (const ModuleSpec &module_spec)
uuid_str = uuid_str + ".debug";
}
- // Get full path to our module. Needed to check debug files like this:
- // /usr/lib/debug/usr/lib/libboost_date_time.so.1.46.1
- std::string module_filename = module_spec.GetFileSpec().GetPath();
+ // Get directory of our module. Needed to check debug files like this:
+ // /usr/lib/debug/usr/lib/library.so.debug
+ std::string module_directory = module_spec.GetFileSpec().GetDirectory().AsCString();
size_t num_directories = debug_file_search_paths.GetSize();
for (size_t idx = 0; idx < num_directories; ++idx)
@@ -79,7 +79,7 @@ Symbols::LocateExecutableSymbolFile (const ModuleSpec &module_spec)
files.push_back (dirname + "/" + symbol_filename);
files.push_back (dirname + "/.debug/" + symbol_filename);
files.push_back (dirname + "/.build-id/" + uuid_str);
- files.push_back (dirname + module_filename);
+ files.push_back (dirname + module_directory + "/" + symbol_filename);
const uint32_t num_files = files.size();
for (size_t idx_file = 0; idx_file < num_files; ++idx_file)
OpenPOWER on IntegriCloud