[Lldb-commits] [lldb] r270358 - Fix an incorrectly used locking in HistoryThread and HistoryUnwind, where unique_lock's release() was called causing the mutex to stay locked.
Author: kuba.brecka Date: Sun May 22 07:24:38 2016 New Revision: 270358 URL: http://llvm.org/viewvc/llvm-project?rev=270358&view=rev Log: Fix an incorrectly used locking in HistoryThread and HistoryUnwind, where unique_lock's release() was called causing the mutex to stay locked. Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=270358&r1=270357&r2=270358&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Sun May 22 07:24:38 2016 @@ -75,8 +75,7 @@ lldb::StackFrameListSP HistoryThread::GetStackFrameList () { // FIXME do not throw away the lock after we acquire it.. -std::unique_lock lock(m_framelist_mutex); -lock.release(); +std::lock_guard lock(m_framelist_mutex); if (m_framelist.get() == NULL) { m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true)); Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=270358&r1=270357&r2=270358&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Sun May 22 07:24:38 2016 @@ -65,8 +65,7 @@ bool HistoryUnwind::DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t& cfa, lldb::addr_t& pc) { // FIXME do not throw away the lock after we acquire it.. -std::unique_lock guard(m_unwind_mutex); -guard.release(); +std::lock_guard guard(m_unwind_mutex); if (frame_idx < m_pcs.size()) { cfa = frame_idx; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270359 - Revert r270358 ("Fix an incorrectly used locking in HistoryThread and HistoryUnwind").
Author: kuba.brecka Date: Sun May 22 09:05:28 2016 New Revision: 270359 URL: http://llvm.org/viewvc/llvm-project?rev=270359&view=rev Log: Revert r270358 ("Fix an incorrectly used locking in HistoryThread and HistoryUnwind"). Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=270359&r1=270358&r2=270359&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Sun May 22 09:05:28 2016 @@ -75,7 +75,8 @@ lldb::StackFrameListSP HistoryThread::GetStackFrameList () { // FIXME do not throw away the lock after we acquire it.. -std::lock_guard lock(m_framelist_mutex); +std::unique_lock lock(m_framelist_mutex); +lock.release(); if (m_framelist.get() == NULL) { m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true)); Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=270359&r1=270358&r2=270359&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Sun May 22 09:05:28 2016 @@ -65,7 +65,8 @@ bool HistoryUnwind::DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t& cfa, lldb::addr_t& pc) { // FIXME do not throw away the lock after we acquire it.. -std::lock_guard guard(m_unwind_mutex); +std::unique_lock guard(m_unwind_mutex); +guard.release(); if (frame_idx < m_pcs.size()) { cfa = frame_idx; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270363 - A better fix of incorrectly used locking in HistoryThread and HistoryUnwind.
Author: kuba.brecka Date: Sun May 22 09:19:11 2016 New Revision: 270363 URL: http://llvm.org/viewvc/llvm-project?rev=270363&view=rev Log: A better fix of incorrectly used locking in HistoryThread and HistoryUnwind. Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=270363&r1=270362&r2=270363&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Sun May 22 09:19:11 2016 @@ -76,7 +76,7 @@ HistoryThread::GetStackFrameList () { // FIXME do not throw away the lock after we acquire it.. std::unique_lock lock(m_framelist_mutex); -lock.release(); +lock.unlock(); if (m_framelist.get() == NULL) { m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true)); Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=270363&r1=270362&r2=270363&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Sun May 22 09:19:11 2016 @@ -66,7 +66,7 @@ HistoryUnwind::DoGetFrameInfoAtIndex (ui { // FIXME do not throw away the lock after we acquire it.. std::unique_lock guard(m_unwind_mutex); -guard.release(); +guard.unlock(); if (frame_idx < m_pcs.size()) { cfa = frame_idx; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270364 - Reword ThreadSanitizer message for invalid mutex reports.
Author: kuba.brecka Date: Sun May 22 09:32:45 2016 New Revision: 270364 URL: http://llvm.org/viewvc/llvm-project?rev=270364&view=rev Log: Reword ThreadSanitizer message for invalid mutex reports. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py?rev=270364&r1=270363&r2=270364&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py Sun May 22 09:32:45 2016 @@ -49,7 +49,7 @@ class TsanMultipleTestCase(TestBase): (stop_description == "Data race detected") or (stop_description == "Use of deallocated memory detected") or (stop_description == "Thread leak detected") or - (stop_description == "Use of an invalid mutex (e.g. uninitialized or destroyed) detected") or + (stop_description == "Use of an uninitialized or destroyed mutex detected") or (stop_description == "Unlock of an unlocked mutex (or by a wrong thread) detected") ) Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp?rev=270364&r1=270363&r2=270364&view=diff == --- lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp (original) +++ lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Sun May 22 09:32:45 2016 @@ -465,7 +465,7 @@ ThreadSanitizerRuntime::FormatDescriptio } else if (description == "mutex-double-lock") { return "Double lock of a mutex"; } else if (description == "mutex-invalid-access") { -return "Use of an invalid mutex (e.g. uninitialized or destroyed)"; +return "Use of an uninitialized or destroyed mutex"; } else if (description == "mutex-bad-unlock") { return "Unlock of an unlocked mutex (or by a wrong thread)"; } else if (description == "mutex-bad-read-lock") { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270365 - Reword ThreadSanitizer messages to use a lowercase 't' in thread names when in the middle of a sentence.
Author: kuba.brecka Date: Sun May 22 09:56:33 2016 New Revision: 270365 URL: http://llvm.org/viewvc/llvm-project?rev=270365&view=rev Log: Reword ThreadSanitizer messages to use a lowercase 't' in thread names when in the middle of a sentence. Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp?rev=270365&r1=270364&r2=270365&view=diff == --- lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp (original) +++ lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Sun May 22 09:56:33 2016 @@ -636,10 +636,10 @@ ThreadSanitizerRuntime::GetLocationDescr result = Sprintf("Location is a %ld-byte heap object at 0x%llx", size, addr); } else if (type == "stack") { int tid = loc->GetAsDictionary()->GetValueForKey("thread_id")->GetAsInteger()->GetValue(); -result = Sprintf("Location is stack of Thread %d", tid); +result = Sprintf("Location is stack of thread %d", tid); } else if (type == "tls") { int tid = loc->GetAsDictionary()->GetValueForKey("thread_id")->GetAsInteger()->GetValue(); -result = Sprintf("Location is TLS of Thread %d", tid); +result = Sprintf("Location is TLS of thread %d", tid); } else if (type == "fd") { int fd = loc->GetAsDictionary()->GetValueForKey("file_descriptor")->GetAsInteger()->GetValue(); result = Sprintf("Location is file descriptor %d", fd); @@ -766,7 +766,7 @@ GenerateThreadName(std::string path, Str bool is_atomic = o->GetObjectForDotSeparatedPath("is_atomic")->GetBooleanValue(); addr_t addr = o->GetObjectForDotSeparatedPath("address")->GetIntegerValue(); -result = Sprintf("%s%s of size %d at 0x%llx by Thread %d", is_atomic ? "atomic " : "", is_write ? "write" : "read", size, addr, thread_id); +result = Sprintf("%s%s of size %d at 0x%llx by thread %d", is_atomic ? "atomic " : "", is_write ? "write" : "read", size, addr, thread_id); } if (path == "threads") { @@ -779,9 +779,9 @@ GenerateThreadName(std::string path, Str int thread_id = o->GetObjectForDotSeparatedPath("thread_id")->GetIntegerValue(); int fd = o->GetObjectForDotSeparatedPath("file_descriptor")->GetIntegerValue(); if (type == "heap") { -result = Sprintf("Heap block allocated by Thread %d", thread_id); +result = Sprintf("Heap block allocated by thread %d", thread_id); } else if (type == "fd") { -result = Sprintf("File descriptor %d created by Thread %t", fd, thread_id); +result = Sprintf("File descriptor %d created by thread %t", fd, thread_id); } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270377 - SymbolFile: remove an unused variable
Author: compnerd Date: Sun May 22 15:16:53 2016 New Revision: 270377 URL: http://llvm.org/viewvc/llvm-project?rev=270377&view=rev Log: SymbolFile: remove an unused variable Address a -Wunused-but-set-variable warning from gcc. NFC. Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp?rev=270377&r1=270376&r2=270377&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp Sun May 22 15:16:53 2016 @@ -468,7 +468,6 @@ DWARFASTParserJava::ParseChildMembers(co DWARFFormValue encoding_uid; uint32_t member_byte_offset = UINT32_MAX; DWARFExpression member_location_expression(dwarf_cu); -bool artificial = true; DWARFAttributes attributes; size_t num_attributes = die.GetAttributes(attributes); @@ -494,7 +493,7 @@ DWARFASTParserJava::ParseChildMembers(co member_byte_offset = form_value.Unsigned(); break; case DW_AT_artificial: -artificial = form_value.Boolean(); +static_cast(form_value.Boolean()); break; case DW_AT_accessibility: // TODO: Handle when needed ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20368: Remove Platform usages from NativeProcessLinux
jaydeep added a comment. Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp:53 @@ -22,2 +52,3 @@ + NativeRegisterContextLinux::NativeRegisterContextLinux(NativeThreadProtocol &native_thread, uint32_t concrete_frame_idx, We have tried executing ptrace(NT_PRSTATUS) on MIPS with 3.18. It is able to detect the arch correctly (64->64 and 64->32). However with 3.10 it fails with EIO. Is there any fallback method when ptrace(NT_PRSTATUS) fails? http://reviews.llvm.org/D20368 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits