summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2019-02-06 04:08:09 +0000
committerJason Molenda <jmolenda@apple.com>2019-02-06 04:08:09 +0000
commit8130bf67baa7739dc184c2daccc1b1c491f3fdeb (patch)
tree0d145a395352d7473687b0c37e4cf6bbfa91dba2
parent23fdd5a37ff4e0512af0b40f6ff3e6db4694e937 (diff)
downloadbcm5719-llvm-8130bf67baa7739dc184c2daccc1b1c491f3fdeb.tar.gz
bcm5719-llvm-8130bf67baa7739dc184c2daccc1b1c491f3fdeb.zip
Add a warning to GDBRemoteRegisterContext (if packet logging enabled)
if the size of the g packet response was smaller than expected and is going to be ignored. llvm-svn: 353269
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index 11cb034dc53..2e88ecbeab1 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -205,6 +205,14 @@ bool GDBRemoteRegisterContext::ReadRegisterBytes(const RegisterInfo *reg_info,
if (buffer_sp->GetByteSize() >= m_reg_data.GetByteSize()) {
SetAllRegisterValid(true);
return true;
+ } else {
+ Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_THREAD |
+ GDBR_LOG_PACKETS));
+ if (log)
+ log->Printf ("error: GDBRemoteRegisterContext::ReadRegisterBytes tried to read the "
+ "entire register context at once, expected at least %" PRId64 " bytes "
+ "but only got %" PRId64 " bytes.", m_reg_data.GetByteSize(),
+ buffer_sp->GetByteSize());
}
}
return false;
OpenPOWER on IntegriCloud