summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp3
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp6
3 files changed, 7 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index f47f1f2521c..6e2fe1c6847 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -397,6 +397,9 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp)
bool
GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data_sp)
{
+ if (!data_sp || data_sp->GetBytes() == NULL || data_sp->GetByteSize() == 0)
+ return false;
+
GDBRemoteCommunication &gdb_comm = GetGDBProcess().GetGDBRemote();
StringExtractorGDBRemote response;
Mutex::Locker locker;
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 5e99e9ce331..4fca6f06d13 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -949,7 +949,7 @@ ProcessGDBRemote::UpdateThreadListIfNeeded ()
{
// locker will keep a mutex locked until it goes out of scope
Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD);
- if (log && log->GetMask().IsSet(GDBR_LOG_VERBOSE))
+ if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
log->Printf ("ProcessGDBRemote::%s (pid = %i)", __FUNCTION__, GetID());
Mutex::Locker locker (m_thread_list.GetMutex ());
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
index b34df7bacb8..5a7348636e4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
@@ -27,7 +27,7 @@ ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (uint32_t mask)
Log *log = g_log;
if (log && mask)
{
- uint32_t log_mask = log->GetMask().GetAllFlagBits();
+ uint32_t log_mask = log->GetMask().Get();
if ((log_mask & mask) != mask)
return NULL;
}
@@ -84,8 +84,8 @@ ProcessGDBRemoteLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, A
}
if (flag_bits == 0)
flag_bits = GDBR_LOG_DEFAULT;
- g_log->GetMask().SetAllFlagBits(flag_bits);
- g_log->GetOptions().SetAllFlagBits(log_options);
+ g_log->GetMask().Reset(flag_bits);
+ g_log->GetOptions().Reset(log_options);
}
return g_log;
}
OpenPOWER on IntegriCloud