[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
Tue Oct 11 07:03:57 PDT 2016


rnchamberlain updated this revision to Diff 74248.
rnchamberlain added a comment.

Updating as suggested to use StringRef.contains()


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,7 @@
             return error;
           }
           llvm::StringRef path(cstr);
-          if (path.startswith("/lib/x86_64-linux-gnu") ||
-              path.startswith("/lib/i386-linux-gnu")) {
+          if (path.contains("/lib/x86_64-linux-gnu") || path.contains("/lib/i386-linux-gnu")) {
             arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
             break;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25179.74248.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161011/a630dfca/attachment.bin>


More information about the lldb-commits mailing list