[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.

Richard Chamberlain via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 3 02:18:14 PDT 2016


rnchamberlain created this revision.
rnchamberlain added reviewers: clayborg, ted, hhellyer.
rnchamberlain added a subscriber: lldb-commits.

ObjectFileELF::RefineModuleDetailsFromNote() identifies Linux core dumps by searching for
 library paths starting with /lib/x86_64-linux-gnu or /lib/i386-linux-gnu. This change widens the
test to allow for linux installations which have addition directories in the path.


https://reviews.llvm.org/D25179

Files:
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp


Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1405,8 +1405,8 @@
             return error;
           }
           llvm::StringRef path(cstr);
-          if (path.startswith("/lib/x86_64-linux-gnu") ||
-              path.startswith("/lib/i386-linux-gnu")) {
+          if (path.find("/lib/x86_64-linux-gnu") != llvm::StringRef::npos ||
+              path.find("/lib/i386-linux-gnu") != llvm::StringRef::npos) {
             arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
             break;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25179.73249.patch
Type: text/x-patch
Size: 702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161003/8ad4f6b6/attachment.bin>


More information about the lldb-commits mailing list