From f73363f1dd94996356cefbf24388f561891acf0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:09:23 +0000 Subject: Vendor import of lldb trunk r338150: https://llvm.org/svn/llvm-project/lldb/trunk@338150 --- source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp') diff --git a/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp index 1902cc492ff4..7fca0fc24fdb 100644 --- a/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp +++ b/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp @@ -52,11 +52,11 @@ ThreadKDP::~ThreadKDP() { const char *ThreadKDP::GetName() { if (m_thread_name.empty()) - return NULL; + return nullptr; return m_thread_name.c_str(); } -const char *ThreadKDP::GetQueueName() { return NULL; } +const char *ThreadKDP::GetQueueName() { return nullptr; } void ThreadKDP::RefreshStateAfterStop() { // Invalidate all registers in our register context. We don't set "force" to @@ -65,8 +65,8 @@ void ThreadKDP::RefreshStateAfterStop() { // context by the time this function gets called. The KDPRegisterContext // class has been made smart enough to detect when it needs to invalidate // which registers are valid by putting hooks in the register read and - // register supply functions where they check the process stop ID and do - // the right thing. + // register supply functions where they check the process stop ID and do the + // right thing. const bool force = false; lldb::RegisterContextSP reg_ctx_sp(GetRegisterContext()); if (reg_ctx_sp) @@ -79,8 +79,8 @@ void ThreadKDP::Dump(Log *log, uint32_t index) {} bool ThreadKDP::ShouldStop(bool &step_more) { return true; } lldb::RegisterContextSP ThreadKDP::GetRegisterContext() { - if (m_reg_context_sp.get() == NULL) - m_reg_context_sp = CreateRegisterContextForFrame(NULL); + if (!m_reg_context_sp) + m_reg_context_sp = CreateRegisterContextForFrame(nullptr); return m_reg_context_sp; } @@ -119,7 +119,7 @@ ThreadKDP::CreateRegisterContextForFrame(StackFrame *frame) { } } else { Unwind *unwinder = GetUnwinder(); - if (unwinder) + if (unwinder != nullptr) reg_ctx_sp = unwinder->CreateRegisterContextForFrame(frame); } return reg_ctx_sp; @@ -151,8 +151,8 @@ void ThreadKDP::SetStopInfoFrom_KDP_EXCEPTION( const uint32_t exc_type = exc_reply_packet.GetU32(&offset); const uint32_t exc_code = exc_reply_packet.GetU32(&offset); const uint32_t exc_subcode = exc_reply_packet.GetU32(&offset); - // We have to make a copy of the stop info because the thread list - // will iterate through the threads and clear all stop infos.. + // We have to make a copy of the stop info because the thread list will + // iterate through the threads and clear all stop infos.. // Let the StopInfoMachException::CreateStopReasonWithMachException() // function update the PC if needed as we might hit a software breakpoint -- cgit v1.2.3