Re: [Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
I must have forgotten to add a doxygen comment on it. Will do today On Tue, Oct 11, 2016 at 7:09 AM Richard Chamberlain via lldb-commits < lldb-commits@lists.llvm.org> wrote: > rnchamberlain added a comment. > > Thanks, that's nicer. I did have a look for a 'contains()' method, but it > has not made it into the docs yet. > http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html > > > https://reviews.llvm.org/D25179 > > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
rnchamberlain added a comment. Thanks, that's nicer. I did have a look for a 'contains()' method, but it has not made it into the docs yet. http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html https://reviews.llvm.org/D25179 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
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; } 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; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
hhellyer added a comment. The change seems unlikely to pick up many false positives and core dumps from the type of system described in the bug are only going to get more common. https://reviews.llvm.org/D25179 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
rnchamberlain added a comment. More information, including readelf output from the dump, in the bugzilla here: https://llvm.org/bugs/show_bug.cgi?id=30485 https://reviews.llvm.org/D25179 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
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; } 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; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits