summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp')
-rw-r--r--source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 116155d9a2324..8908108eff4bd 100644
--- a/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -9,25 +9,21 @@
#include "CommunicationKDP.h"
-// C Includes
#include <errno.h>
#include <limits.h>
#include <string.h>
-// C++ Includes
-// Other libraries and framework includes
#include "lldb/Core/DumpDataExtractor.h"
-#include "lldb/Core/State.h"
#include "lldb/Host/Host.h"
#include "lldb/Target/Process.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/State.h"
#include "lldb/Utility/UUID.h"
-// Project includes
#include "ProcessKDPLog.h"
using namespace lldb;
@@ -467,19 +463,13 @@ lldb_private::UUID CommunicationKDP::GetUUID() {
bool CommunicationKDP::RemoteIsEFI() {
if (GetKernelVersion() == NULL)
return false;
- if (strncmp(m_kernel_version.c_str(), "EFI", 3) == 0)
- return true;
- else
- return false;
+ return strncmp(m_kernel_version.c_str(), "EFI", 3) == 0;
}
bool CommunicationKDP::RemoteIsDarwinKernel() {
if (GetKernelVersion() == NULL)
return false;
- if (m_kernel_version.find("Darwin Kernel") != std::string::npos)
- return true;
- else
- return false;
+ return m_kernel_version.find("Darwin Kernel") != std::string::npos;
}
lldb::addr_t CommunicationKDP::GetLoadAddress() {
@@ -1262,9 +1252,7 @@ bool CommunicationKDP::SendRequestResume() {
request_packet.PutHex32(GetCPUMask());
DataExtractor reply_packet;
- if (SendRequestAndGetReply(command, request_packet, reply_packet))
- return true;
- return false;
+ return SendRequestAndGetReply(command, request_packet, reply_packet);
}
bool CommunicationKDP::SendRequestBreakpoint(bool set, addr_t addr) {
@@ -1297,7 +1285,5 @@ bool CommunicationKDP::SendRequestSuspend() {
const uint32_t command_length = 8;
MakeRequestPacketHeader(command, request_packet, command_length);
DataExtractor reply_packet;
- if (SendRequestAndGetReply(command, request_packet, reply_packet))
- return true;
- return false;
+ return SendRequestAndGetReply(command, request_packet, reply_packet);
}