diff options
| author | Jason Molenda <jmolenda@apple.com> | 2019-02-06 04:08:09 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2019-02-06 04:08:09 +0000 |
| commit | 8130bf67baa7739dc184c2daccc1b1c491f3fdeb (patch) | |
| tree | 0d145a395352d7473687b0c37e4cf6bbfa91dba2 | |
| parent | 23fdd5a37ff4e0512af0b40f6ff3e6db4694e937 (diff) | |
| download | bcm5719-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.cpp | 8 |
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; |

