[Lldb-commits] [PATCH] D40587: [lldb] Minor fixes in TaskPool
fjricci added inline comments. Comment at: source/Host/common/TaskPool.cpp:55 + static const unsigned g_hardware_concurrency = +std::max(1u, std::thread::hardware_concurrency()); + return g_hardware_concurrency; Is 1 the best default here when hardware_concurrency() isn't computable? Seems like it could have some big performance implications, and I'm not sure how common it is for people to debug on host machines that only support one thread. Repository: rL LLVM https://reviews.llvm.org/D40587 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci created this revision. fjricci added reviewers: clayborg, zturner, tberghammer. Herald added subscribers: JDevlieghere, aprantl. When dwarf parse logging is enabled (ie `log enable dwarf info`), deadlocks can occur during dwarf parsing: Thread 1: `SymbolVendor::FindFunctions` (acquires mutex for Module) `SymbolFileDWARF::Index` Task pool threads: `ExtractDIEsIfNeeded` `Module::LogMessageVerboseBacktrace` `Module::GetDescription` (tries to acquire mutex for Module and deadlocks) Since `GetDescription` is read-only, only touches fairly immutable data (architecture and filename), and is only used for logging, the most straightforward fix is to remove the lock guard from this function. https://reviews.llvm.org/D41909 Files: source/Core/Module.cpp Index: source/Core/Module.cpp === --- source/Core/Module.cpp +++ source/Core/Module.cpp @@ -1077,8 +1077,6 @@ } void Module::GetDescription(Stream *s, lldb::DescriptionLevel level) { - std::lock_guard guard(m_mutex); - if (level >= eDescriptionLevelFull) { if (m_arch.IsValid()) s->Printf("(%s) ", m_arch.GetArchitectureName()); Index: source/Core/Module.cpp === --- source/Core/Module.cpp +++ source/Core/Module.cpp @@ -1077,8 +1077,6 @@ } void Module::GetDescription(Stream *s, lldb::DescriptionLevel level) { - std::lock_guard guard(m_mutex); - if (level >= eDescriptionLevelFull) { if (m_arch.IsValid()) s->Printf("(%s) ", m_arch.GetArchitectureName()); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci added a comment. I guess the question is whether we expect that someone will do something like change the module's filepath while we're printing a log message with that filepath in it. https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci added a comment. Actually I don't think even that is racy, because we just get a pointer to the const char *, which is immutable anyway. https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci added a comment. It's definitely possible to re-design the lock holding in such a way that we can keep this locked, but I don't want to go through all the work to do that if there isn't any added value to doing so. https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci added a comment. > I think a better option would be to remove that lock and if it is needed then > lock it just for the calls where it necessary. The fact that SymbolVendor > locks a mutex inside a Module feels like a pretty bad layering violation for > me what can cause many other deadlocks so it would be nice to fix that > instead of hacking it around here. Was thinking about that as well. Will look into it. https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci added a comment. > SymbolVendor::FindFunctions will lazily parse functions from the debug info > and populate things inside the module, so the lock is required. Can it give up the lock while it's blocked on worker threads? Holding a lock while blocked seems like a recipe for deadlocks (like this one). https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D44041: Only replace object file sections when non-empty
fjricci created this revision. fjricci added reviewers: clayborg, zturner, labath. Herald added subscribers: JDevlieghere, arichardson, emaste. In order to allow some sections to exist either in split debug-info or in the main binary, don't replace non-empty sections with empty sections. https://reviews.llvm.org/D44041 Files: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp Index: source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp === --- source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -141,7 +141,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( objfile_section_list->FindSectionByType(section_type, true)); -if (section_sp) { +if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( module_section_list->FindSectionByType(section_type, true)); if (module_section_sp) Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp === --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2004,7 +2004,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( elf_section_list->FindSectionByType(section_type, true)); -if (section_sp) { +if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( unified_section_list.FindSectionByType(section_type, true)); if (module_section_sp) Index: source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp === --- source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -141,7 +141,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( objfile_section_list->FindSectionByType(section_type, true)); -if (section_sp) { +if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( module_section_list->FindSectionByType(section_type, true)); if (module_section_sp) Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp === --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2004,7 +2004,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( elf_section_list->FindSectionByType(section_type, true)); -if (section_sp) { +if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( unified_section_list.FindSectionByType(section_type, true)); if (module_section_sp) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D44042: Ensure that trailing characters aren't included in PECOFF section names
fjricci created this revision. fjricci added reviewers: clayborg, zturner, wallace. If a section name is exactly 8 characters (the maximum section name length), and the next item in the section header struct contains a non-zero value, we would append garbage data to the end of the section name string due to the lack of null-termination. Ensure that we don't construct the section name with more than sizeof(sect.name) characters. https://reviews.llvm.org/D44042 Files: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp === --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -505,7 +505,10 @@ return false; } - sect_name = sect.name; + + // The section name has a max length of 8 characters, but isn't + // necessarily null-terminated + sect_name = std::string(sect.name, sizeof(sect.name)); return true; } Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp === --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -505,7 +505,10 @@ return false; } - sect_name = sect.name; + + // The section name has a max length of 8 characters, but isn't + // necessarily null-terminated + sect_name = std::string(sect.name, sizeof(sect.name)); return true; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D41909: Fix deadlock in dwarf logging
fjricci abandoned this revision. fjricci added a comment. I'm not going to get to this https://reviews.llvm.org/D41909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31335: Allow getCompiler to return None in the test suite
fjricci created this revision. Prior to r259433, getCompiler could return None without causing a test suite crash. However, passing a NoneType to realpath will cause a crash. Prevent this crash by allowing getCompiler to return None. https://reviews.llvm.org/D31335 Files: packages/Python/lldbsuite/test/plugins/builder_base.py Index: packages/Python/lldbsuite/test/plugins/builder_base.py === --- packages/Python/lldbsuite/test/plugins/builder_base.py +++ packages/Python/lldbsuite/test/plugins/builder_base.py @@ -33,7 +33,7 @@ """Returns the compiler in effect the test suite is running with.""" compiler = os.environ.get("CC", "clang") compiler = lldbutil.which(compiler) -return os.path.realpath(compiler) +return os.path.realpath(compiler) if compiler else None def getArchFlag(): Index: packages/Python/lldbsuite/test/plugins/builder_base.py === --- packages/Python/lldbsuite/test/plugins/builder_base.py +++ packages/Python/lldbsuite/test/plugins/builder_base.py @@ -33,7 +33,7 @@ """Returns the compiler in effect the test suite is running with.""" compiler = os.environ.get("CC", "clang") compiler = lldbutil.which(compiler) -return os.path.realpath(compiler) +return os.path.realpath(compiler) if compiler else None def getArchFlag(): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31335: Allow getCompiler to return None in the test suite
fjricci abandoned this revision. fjricci added a comment. I primarily wrote this because `getArchFlag()` accounts for the possibility that `getCompiler()` can be None. But my problem was unrelated, so I don't need this (and I agree that it would be surprising if anyone did). https://reviews.llvm.org/D31335 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25886: [Test Suite] Properly respect --framework option
fjricci added inline comments. Comment at: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py:1418 "include")), -'LD_EXTRAS': "-L%s -llldb" % lib_dir} +'LD_EXTRAS': "-L%s/../lib -llldb -Wl,-rpath,%s/../lib" % (lib_dir, lib_dir)} elif sys.platform.startswith('win'): Why do we need to make this `-L$(lib_dir)/../lib` instead of the original `-L$(lib_dir)`? This breaks cases where `lib_dir` is `lib64` and not `lib` Repository: rL LLVM https://reviews.llvm.org/D25886 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32711: Add missing 'arch' key to valid qHostInfo keys
fjricci created this revision. 'arch' is a valid qHostInfo key, but the unit test for qHostInfo did not include it in the set of possible keys. https://reviews.llvm.org/D32711 Files: packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py Index: packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py === --- packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py +++ packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py @@ -14,6 +14,7 @@ mydir = TestBase.compute_mydir(__file__) KNOWN_HOST_INFO_KEYS = set([ +"arch", "cputype", "cpusubtype", "distribution_id", Index: packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py === --- packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py +++ packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py @@ -14,6 +14,7 @@ mydir = TestBase.compute_mydir(__file__) KNOWN_HOST_INFO_KEYS = set([ +"arch", "cputype", "cpusubtype", "distribution_id", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32719: Don't attempt to use mpx registers on unsupported platforms
fjricci created this revision. The existing cpp-level checks using PR_MPX_ENABLE_MANAGEMENT aren't sufficient, as this isn't defined for linux kernel versions below 3.19. https://reviews.llvm.org/D32719 Files: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py @@ -19,13 +19,28 @@ mydir = TestBase.compute_mydir(__file__) +def hasMPX(self): +if lldb.remote_platform: +self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"') +cpuinfo_path = "cpuinfo" +self.addTearDownHook(lambda: os.unlink("cpuinfo")) +else: +cpuinfo_path = "/proc/cpuinfo" + +with open(cpuinfo_path, 'r') as f: +return " mpx " in f.read() + @skipIf(compiler="clang") @skipIf(oslist=no_match(['linux'])) @skipIf(archs=no_match(['i386', 'x86_64'])) @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX. def test_mpx_boundary_violation(self): """Test Intel(R) MPX bound violation signal.""" self.build() + +if !self.hasMPX(): +return + self.mpx_boundary_violation() def mpx_boundary_violation(self): Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py @@ -22,13 +22,28 @@ def setUp(self): TestBase.setUp(self) +def hasMPX(self): +if lldb.remote_platform: +self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"') +cpuinfo_path = "cpuinfo" +self.addTearDownHook(lambda: os.unlink("cpuinfo")) +else: +cpuinfo_path = "/proc/cpuinfo" + +with open(cpuinfo_path, 'r') as f: +return " mpx " in f.read() + @skipIf(compiler="clang") @skipIf(oslist=no_match(['linux'])) @skipIf(archs=no_match(['i386', 'x86_64'])) @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX. def test_mpx_registers_with_example_code(self): """Test Intel(R) MPX registers with example code.""" self.build() + +if !self.hasMPX(): +return + self.mpx_registers_with_example_code() def mpx_registers_with_example_code(self): Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py @@ -19,13 +19,28 @@ mydir = TestBase.compute_mydir(__file__) +def hasMPX(self): +if lldb.remote_platform: +self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"') +cpuinfo_path = "cpuinfo" +self.addTearDownHook(lambda: os.unlink("cpuinfo")) +else: +cpuinfo_path = "/proc/cpuinfo" + +with open(cpuinfo_path, 'r') as f: +return " mpx " in f.read() + @skipIf(compiler="clang") @skipIf(oslist=no_match(['linux'])) @skipIf(archs=no_match(['i386', 'x86_64'])) @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX. def test_mpx_boundary_violation(self): """Test Intel(R) MPX bound violation signal.""" self.build() + +if !self.hasMPX(): +return + self.mpx_boundary_violation() def mpx_boundary_violation(self): Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py @@ -22,13 +22,28 @@
[Lldb-commits] [PATCH] D32719: Don't attempt to use mpx registers on unsupported platforms
fjricci added a comment. Yeah, that works too, just wasn't sure which way was preferred. https://reviews.llvm.org/D32719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32719: Don't attempt to use mpx registers on unsupported platforms
fjricci updated this revision to Diff 97447. fjricci added a comment. Move checks into cpp files https://reviews.llvm.org/D32719 Files: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp @@ -29,6 +29,11 @@ unsigned int rax, rbx, rcx, rdx; int array[5]; +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp @@ -14,6 +14,11 @@ int main(int argc, char const *argv[]) { +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp @@ -29,6 +29,11 @@ unsigned int rax, rbx, rcx, rdx; int array[5]; +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp === --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp @@ -14,6 +14,11 @@ int main(int argc, char const *argv[]) { +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32719: Don't attempt to use mpx registers on unsupported platforms
This revision was automatically updated to reflect the committed changes. Closed by commit rL302027: Don't attempt to use mpx registers on unsupported platforms (authored by fjricci). Changed prior to commit: https://reviews.llvm.org/D32719?vs=97447&id=97648#toc Repository: rL LLVM https://reviews.llvm.org/D32719 Files: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp @@ -14,6 +14,11 @@ int main(int argc, char const *argv[]) { +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp @@ -29,6 +29,11 @@ unsigned int rax, rbx, rcx, rdx; int array[5]; +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp @@ -14,6 +14,11 @@ int main(int argc, char const *argv[]) { +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp @@ -29,6 +29,11 @@ unsigned int rax, rbx, rcx, rdx; int array[5]; +// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19 +#ifndef PR_MPX_ENABLE_MANAGEMENT +return -1; +#endif + // This call returns 0 only if the CPU and the kernel support Intel(R) MPX. if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0) return -1; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32711: Add missing 'arch' key to valid qHostInfo keys
This revision was automatically updated to reflect the committed changes. Closed by commit rL302260: Add missing 'arch' key to valid qHostInfo keys (authored by fjricci). Changed prior to commit: https://reviews.llvm.org/D32711?vs=97322&id=97983#toc Repository: rL LLVM https://reviews.llvm.org/D32711 Files: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py === --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py @@ -14,6 +14,7 @@ mydir = TestBase.compute_mydir(__file__) KNOWN_HOST_INFO_KEYS = set([ +"arch", "cputype", "cpusubtype", "distribution_id", Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py === --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py @@ -14,6 +14,7 @@ mydir = TestBase.compute_mydir(__file__) KNOWN_HOST_INFO_KEYS = set([ +"arch", "cputype", "cpusubtype", "distribution_id", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D37930: Use ThreadLauncher to launch TaskPool threads
fjricci created this revision. This allows for the stack size to be configured, which isn't possible with std::thread. Prevents overflowing the stack when performing complex operations in the task pool on darwin, where the default pthread stack size is only 512kb. https://reviews.llvm.org/D37930 Files: source/Utility/TaskPool.cpp Index: source/Utility/TaskPool.cpp === --- source/Utility/TaskPool.cpp +++ source/Utility/TaskPool.cpp @@ -8,6 +8,7 @@ //===--===// #include "lldb/Utility/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" #include // for uint32_t #include// for queue @@ -23,6 +24,8 @@ private: TaskPoolImpl(); + static lldb::thread_result_t WorkerPtr(void *pool); + static void Worker(TaskPoolImpl *pool); std::queue> m_tasks; @@ -54,10 +57,17 @@ // This prevents the thread // from exiting prematurely and triggering a linux libc bug // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). -std::thread(Worker, this).detach(); +lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr, + this, nullptr, 8 * 1024 * 1024) +.Release(); } } +lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) { + Worker((TaskPoolImpl *)pool); + return 0; +} + void TaskPoolImpl::Worker(TaskPoolImpl *pool) { while (true) { std::unique_lock lock(pool->m_tasks_mutex); Index: source/Utility/TaskPool.cpp === --- source/Utility/TaskPool.cpp +++ source/Utility/TaskPool.cpp @@ -8,6 +8,7 @@ //===--===// #include "lldb/Utility/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" #include // for uint32_t #include// for queue @@ -23,6 +24,8 @@ private: TaskPoolImpl(); + static lldb::thread_result_t WorkerPtr(void *pool); + static void Worker(TaskPoolImpl *pool); std::queue> m_tasks; @@ -54,10 +57,17 @@ // This prevents the thread // from exiting prematurely and triggering a linux libc bug // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). -std::thread(Worker, this).detach(); +lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr, + this, nullptr, 8 * 1024 * 1024) +.Release(); } } +lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) { + Worker((TaskPoolImpl *)pool); + return 0; +} + void TaskPoolImpl::Worker(TaskPoolImpl *pool) { while (true) { std::unique_lock lock(pool->m_tasks_mutex); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D37930: Use ThreadLauncher to launch TaskPool threads
This revision was automatically updated to reflect the committed changes. Closed by commit rL313537: Use ThreadLauncher to launch TaskPool threads (authored by fjricci). Changed prior to commit: https://reviews.llvm.org/D37930?vs=115484&id=115658#toc Repository: rL LLVM https://reviews.llvm.org/D37930 Files: lldb/trunk/source/Utility/TaskPool.cpp Index: lldb/trunk/source/Utility/TaskPool.cpp === --- lldb/trunk/source/Utility/TaskPool.cpp +++ lldb/trunk/source/Utility/TaskPool.cpp @@ -8,6 +8,7 @@ //===--===// #include "lldb/Utility/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" #include // for uint32_t #include// for queue @@ -23,6 +24,8 @@ private: TaskPoolImpl(); + static lldb::thread_result_t WorkerPtr(void *pool); + static void Worker(TaskPoolImpl *pool); std::queue> m_tasks; @@ -45,6 +48,7 @@ void TaskPoolImpl::AddTask(std::function &&task_fn) { static const uint32_t max_threads = std::thread::hardware_concurrency(); + const size_t min_stack_size = 8 * 1024 * 1024; std::unique_lock lock(m_tasks_mutex); m_tasks.emplace(std::move(task_fn)); @@ -54,10 +58,17 @@ // This prevents the thread // from exiting prematurely and triggering a linux libc bug // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). -std::thread(Worker, this).detach(); +lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr, + this, nullptr, min_stack_size) +.Release(); } } +lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) { + Worker((TaskPoolImpl *)pool); + return 0; +} + void TaskPoolImpl::Worker(TaskPoolImpl *pool) { while (true) { std::unique_lock lock(pool->m_tasks_mutex); Index: lldb/trunk/source/Utility/TaskPool.cpp === --- lldb/trunk/source/Utility/TaskPool.cpp +++ lldb/trunk/source/Utility/TaskPool.cpp @@ -8,6 +8,7 @@ //===--===// #include "lldb/Utility/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" #include // for uint32_t #include// for queue @@ -23,6 +24,8 @@ private: TaskPoolImpl(); + static lldb::thread_result_t WorkerPtr(void *pool); + static void Worker(TaskPoolImpl *pool); std::queue> m_tasks; @@ -45,6 +48,7 @@ void TaskPoolImpl::AddTask(std::function &&task_fn) { static const uint32_t max_threads = std::thread::hardware_concurrency(); + const size_t min_stack_size = 8 * 1024 * 1024; std::unique_lock lock(m_tasks_mutex); m_tasks.emplace(std::move(task_fn)); @@ -54,10 +58,17 @@ // This prevents the thread // from exiting prematurely and triggering a linux libc bug // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). -std::thread(Worker, this).detach(); +lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr, + this, nullptr, min_stack_size) +.Release(); } } +lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) { + Worker((TaskPoolImpl *)pool); + return 0; +} + void TaskPoolImpl::Worker(TaskPoolImpl *pool) { while (true) { std::unique_lock lock(pool->m_tasks_mutex); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D37930: Use ThreadLauncher to launch TaskPool threads
fjricci reopened this revision. fjricci added a comment. This revision is now accepted and ready to land. Is ThreadLauncher unavailable in this code for some reason? The link failed on linux buildbots (building lldb on Darwin was fine locally): http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/13311/steps/run%20unit%20tests/logs/stdio Repository: rL LLVM https://reviews.llvm.org/D37930 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D37930: Use ThreadLauncher to launch TaskPool threads
fjricci updated this revision to Diff 115691. fjricci added a comment. Herald added subscribers: JDevlieghere, mgorny. Move TaskPool from Utility to Host https://reviews.llvm.org/D37930 Files: include/lldb/Host/TaskPool.h include/lldb/Utility/TaskPool.h lldb.xcodeproj/project.pbxproj source/Host/CMakeLists.txt source/Host/common/TaskPool.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp source/Utility/CMakeLists.txt source/Utility/TaskPool.cpp unittests/Host/CMakeLists.txt unittests/Host/TaskPoolTest.cpp unittests/Utility/CMakeLists.txt unittests/Utility/TaskPoolTest.cpp Index: unittests/Utility/CMakeLists.txt === --- unittests/Utility/CMakeLists.txt +++ unittests/Utility/CMakeLists.txt @@ -8,7 +8,6 @@ StatusTest.cpp StringExtractorTest.cpp StructuredDataTest.cpp - TaskPoolTest.cpp TildeExpressionResolverTest.cpp TimeoutTest.cpp TimerTest.cpp Index: unittests/Host/TaskPoolTest.cpp === --- unittests/Host/TaskPoolTest.cpp +++ unittests/Host/TaskPoolTest.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" -#include "lldb/Utility/TaskPool.h" +#include "lldb/Host/TaskPool.h" TEST(TaskPoolTest, AddTask) { auto fn = [](int x) { return x * x + 1; }; Index: unittests/Host/CMakeLists.txt === --- unittests/Host/CMakeLists.txt +++ unittests/Host/CMakeLists.txt @@ -6,6 +6,7 @@ SocketAddressTest.cpp SocketTest.cpp SymbolsTest.cpp + TaskPoolTest.cpp ) if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android") Index: source/Utility/CMakeLists.txt === --- source/Utility/CMakeLists.txt +++ source/Utility/CMakeLists.txt @@ -29,7 +29,6 @@ StringLexer.cpp StringList.cpp StructuredData.cpp - TaskPool.cpp TildeExpressionResolver.cpp Timer.cpp UserID.cpp Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp === --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -53,7 +53,7 @@ #include "lldb/Target/Language.h" -#include "lldb/Utility/TaskPool.h" +#include "lldb/Host/TaskPool.h" #include "DWARFASTParser.h" #include "DWARFASTParserClang.h" Index: source/Host/common/TaskPool.cpp === --- source/Host/common/TaskPool.cpp +++ source/Host/common/TaskPool.cpp @@ -7,7 +7,8 @@ // //===--===// -#include "lldb/Utility/TaskPool.h" +#include "lldb/Host/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" #include // for uint32_t #include// for queue @@ -23,6 +24,8 @@ private: TaskPoolImpl(); + static lldb::thread_result_t WorkerPtr(void *pool); + static void Worker(TaskPoolImpl *pool); std::queue> m_tasks; @@ -45,6 +48,7 @@ void TaskPoolImpl::AddTask(std::function &&task_fn) { static const uint32_t max_threads = std::thread::hardware_concurrency(); + const size_t min_stack_size = 8 * 1024 * 1024; std::unique_lock lock(m_tasks_mutex); m_tasks.emplace(std::move(task_fn)); @@ -54,10 +58,17 @@ // This prevents the thread // from exiting prematurely and triggering a linux libc bug // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). -std::thread(Worker, this).detach(); +lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr, + this, nullptr, min_stack_size) +.Release(); } } +lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) { + Worker((TaskPoolImpl *)pool); + return 0; +} + void TaskPoolImpl::Worker(TaskPoolImpl *pool) { while (true) { std::unique_lock lock(pool->m_tasks_mutex); Index: source/Host/CMakeLists.txt === --- source/Host/CMakeLists.txt +++ source/Host/CMakeLists.txt @@ -31,6 +31,7 @@ common/SoftwareBreakpoint.cpp common/StringConvert.cpp common/Symbols.cpp + common/TaskPool.cpp common/TCPSocket.cpp common/Terminal.cpp common/ThreadLauncher.cpp Index: lldb.xcodeproj/project.pbxproj === --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -2664,8 +2664,8 @@ 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArmUnwindInfo.cpp; path = source/Symbol/ArmUnwindInfo.cpp; sourceTree = ""; }; 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeMap.cpp; path = source/Symbol/TypeMap.cpp; sourceTree = ""; }; 6D9AB3DE1BB2B76B003F2289 /* TypeMap.h
[Lldb-commits] [PATCH] D37930: Use ThreadLauncher to launch TaskPool threads
This revision was automatically updated to reflect the committed changes. Closed by commit rL313637: Use ThreadLauncher to launch TaskPool threads (authored by fjricci). Changed prior to commit: https://reviews.llvm.org/D37930?vs=115691&id=115844#toc Repository: rL LLVM https://reviews.llvm.org/D37930 Files: lldb/trunk/include/lldb/Host/TaskPool.h lldb/trunk/include/lldb/Utility/TaskPool.h lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Host/CMakeLists.txt lldb/trunk/source/Host/common/TaskPool.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Utility/CMakeLists.txt lldb/trunk/source/Utility/TaskPool.cpp lldb/trunk/unittests/Host/CMakeLists.txt lldb/trunk/unittests/Host/TaskPoolTest.cpp lldb/trunk/unittests/Utility/CMakeLists.txt lldb/trunk/unittests/Utility/TaskPoolTest.cpp Index: lldb/trunk/unittests/Host/TaskPoolTest.cpp === --- lldb/trunk/unittests/Host/TaskPoolTest.cpp +++ lldb/trunk/unittests/Host/TaskPoolTest.cpp @@ -0,0 +1,43 @@ +#include "gtest/gtest.h" + +#include "lldb/Host/TaskPool.h" + +TEST(TaskPoolTest, AddTask) { + auto fn = [](int x) { return x * x + 1; }; + + auto f1 = TaskPool::AddTask(fn, 1); + auto f2 = TaskPool::AddTask(fn, 2); + auto f3 = TaskPool::AddTask(fn, 3); + auto f4 = TaskPool::AddTask(fn, 4); + + ASSERT_EQ(10, f3.get()); + ASSERT_EQ(2, f1.get()); + ASSERT_EQ(17, f4.get()); + ASSERT_EQ(5, f2.get()); +} + +TEST(TaskPoolTest, RunTasks) { + std::vector r(4); + + auto fn = [](int x, int &y) { y = x * x + 1; }; + + TaskPool::RunTasks([fn, &r]() { fn(1, r[0]); }, [fn, &r]() { fn(2, r[1]); }, + [fn, &r]() { fn(3, r[2]); }, [fn, &r]() { fn(4, r[3]); }); + + ASSERT_EQ(2, r[0]); + ASSERT_EQ(5, r[1]); + ASSERT_EQ(10, r[2]); + ASSERT_EQ(17, r[3]); +} + +TEST(TaskPoolTest, TaskMap) { + int data[4]; + auto fn = [&data](int x) { data[x] = x * x; }; + + TaskMapOverInt(0, 4, fn); + + ASSERT_EQ(data[0], 0); + ASSERT_EQ(data[1], 1); + ASSERT_EQ(data[2], 4); + ASSERT_EQ(data[3], 9); +} Index: lldb/trunk/unittests/Host/CMakeLists.txt === --- lldb/trunk/unittests/Host/CMakeLists.txt +++ lldb/trunk/unittests/Host/CMakeLists.txt @@ -6,6 +6,7 @@ SocketAddressTest.cpp SocketTest.cpp SymbolsTest.cpp + TaskPoolTest.cpp ) if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android") Index: lldb/trunk/unittests/Utility/CMakeLists.txt === --- lldb/trunk/unittests/Utility/CMakeLists.txt +++ lldb/trunk/unittests/Utility/CMakeLists.txt @@ -8,7 +8,6 @@ StatusTest.cpp StringExtractorTest.cpp StructuredDataTest.cpp - TaskPoolTest.cpp TildeExpressionResolverTest.cpp TimeoutTest.cpp TimerTest.cpp Index: lldb/trunk/source/Utility/CMakeLists.txt === --- lldb/trunk/source/Utility/CMakeLists.txt +++ lldb/trunk/source/Utility/CMakeLists.txt @@ -29,7 +29,6 @@ StringLexer.cpp StringList.cpp StructuredData.cpp - TaskPool.cpp TildeExpressionResolver.cpp Timer.cpp UserID.cpp Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -53,7 +53,7 @@ #include "lldb/Target/Language.h" -#include "lldb/Utility/TaskPool.h" +#include "lldb/Host/TaskPool.h" #include "DWARFASTParser.h" #include "DWARFASTParserClang.h" Index: lldb/trunk/source/Host/CMakeLists.txt === --- lldb/trunk/source/Host/CMakeLists.txt +++ lldb/trunk/source/Host/CMakeLists.txt @@ -31,6 +31,7 @@ common/SoftwareBreakpoint.cpp common/StringConvert.cpp common/Symbols.cpp + common/TaskPool.cpp common/TCPSocket.cpp common/Terminal.cpp common/ThreadLauncher.cpp Index: lldb/trunk/source/Host/common/TaskPool.cpp === --- lldb/trunk/source/Host/common/TaskPool.cpp +++ lldb/trunk/source/Host/common/TaskPool.cpp @@ -0,0 +1,109 @@ +//===- TaskPool.cpp -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "lldb/Host/TaskPool.h" +#include "lldb/Host/ThreadLauncher.h" + +#include // for uint32_t +#include// for queue +#include // for thread + +namespace { +class TaskPoolImpl { +public: + static TaskPoolImpl &GetInstance(); + + void AddTask(std::function &&task_fn); + +private: + TaskPoolImpl(); + + static lldb::th
[Lldb-commits] [PATCH] D38328: Assume git-generated patch files in build scripts
fjricci created this revision. It is probably reasonable to expect that most (or all) users of the patch file feature will be using git, and assuming git patch files makes this feature easier to use. https://reviews.llvm.org/D38328 Files: scripts/Xcode/build-llvm.py scripts/build-lldb-llvm-clang Index: scripts/build-lldb-llvm-clang === --- scripts/build-lldb-llvm-clang +++ scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', Index: scripts/build-lldb-llvm-clang === --- scripts/build-lldb-llvm-clang +++ scripts/build-lldb-llvm-clang @@ -33,15 +33,15 @@ for patch_file in ../scripts/llvm.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./llvm/tools/clang" cd tools/clang for patch_file in ../../../scripts/clang.*.diff do echo "Applying patch from '$patch_file'" -patch -p0 < "$patch_file" +patch -p1 < "$patch_file" done # change directory to "./" Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -224,7 +224,7 @@ f, spec['name'] + '.*.diff')] for p in patches: run_in_directory(["patch", - "-p0", + "-p1", "-i", os.path.join(lldb_source_path(), 'scripts', ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D38328: Assume git-generated patch files in build scripts
fjricci added a comment. Oh I see from the discussion on https://github.com/apple/swift-lldb/pull/252 that it was accidental - don't worry about it Repository: rL LLVM https://reviews.llvm.org/D38328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D38328: Assume git-generated patch files in build scripts
fjricci added a comment. @jasonmolenda - just an FYI that I'm an llvm committer (I contribute frequently to compiler-rt, and used to contribute quite a bit to lldb as well). No worries about this patch though, especially given how small it is. Repository: rL LLVM https://reviews.llvm.org/D38328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D44041: Only replace object file sections when non-empty
fjricci abandoned this revision. fjricci added a comment. Didn’t realize I still had open revisions, haven’t worked on lldb in quite some time CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44041/new/ https://reviews.llvm.org/D44041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits