[Lldb-commits] [lldb] r139981 - /lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Greg Clayton
gclayton at apple.com
Fri Sep 16 22:47:56 PDT 2011
Author: gclayton
Date: Sat Sep 17 00:47:55 2011
New Revision: 139981
URL: http://llvm.org/viewvc/llvm-project?rev=139981&view=rev
Log:
Correctly handle the when we the 'G' packet fails. There were
cases where we were returning no error even though this packet
was failing.
Modified:
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=139981&r1=139980&r2=139981&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Sat Sep 17 00:47:55 2011
@@ -2480,7 +2480,8 @@
std::vector<uint8_t> reg_ctx;
reg_ctx.resize(reg_ctx_size);
- if (packet.GetHexBytes (®_ctx[0], reg_ctx.size(), 0xcc) == reg_ctx.size())
+ const nub_size_t bytes_extracted = packet.GetHexBytes (®_ctx[0], reg_ctx.size(), 0xcc);
+ if (bytes_extracted == reg_ctx.size())
{
// Now write the register context
reg_ctx_size = DNBThreadSetRegisterContext(pid, tid, reg_ctx.data(), reg_ctx.size());
@@ -2489,7 +2490,14 @@
else
return SendPacket ("E55");
}
+ else
+ {
+ DNBLogError("RNBRemote::HandlePacket_G(%s): extracted %zu of %zu bytes, size mismatch\n", p, bytes_extracted, reg_ctx_size);
+ return SendPacket ("E64");
+ }
}
+ else
+ return SendPacket ("E65");
}
More information about the lldb-commits
mailing list