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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 10 10:26:54 PDT 2016

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Use "llvm::StringRef::contains". See inline comment.

Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1408-1409
           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) {
I believe Zach Turner added a "contains" function to StringRef which we should use here:

          if (path.contains("/lib/x86_64-linux-gnu") || path.contains("/lib/i386-linux-gnu")) {


More information about the lldb-commits mailing list