[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

Stephane Sezer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 18:31:59 PST 2017

sas created this revision.
Herald added subscribers: JDevlieghere, emaste.

In ObjectFileELF we try to read the `.gnu_debuglink` section of the ELF
file to determine the name of the debug symbols file. If this section
does not exist, we stop the search. Instead, what we should do is locate
a file with the same name as the ELF binary, which is the default
behavior when there isn't any `.gnu_debuglink` section present.

Ran check-lldb to make sure this doesn't break anything.



Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1000,7 +1000,11 @@
   if (!m_gnu_debuglink_file.empty()) {
     FileSpec file_spec(m_gnu_debuglink_file, false);
+  } else {
+    FileSpec file_spec(GetFileSpec().GetFilename().AsCString(), false);
+    file_spec_list.Append(file_spec);
   return file_spec_list;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40539.124511.patch
Type: text/x-patch
Size: 545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171128/652002ca/attachment-0001.bin>

More information about the lldb-commits mailing list