[Lldb-commits] [PATCH] D13859: [LLDB][LLGS Test] Check length of register, only when its available
Mohit Bhakkad via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 20 03:18:43 PDT 2015
mohit.bhakkad updated this revision to Diff 37843.
mohit.bhakkad added a comment.
This patch makes server send an End of register(E45) response if a register present in reginfo is not available on actual machine.
Repository:
rL LLVM
http://reviews.llvm.org/D13859
Files:
source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1518,6 +1518,12 @@
if (!reg_info)
return SendErrorResponse (69);
+ // Try reading the register, return end of registers response if failed to read.
+ RegisterValue reg_value;
+ Error error = reg_context_sp->ReadRegister (reg_info, reg_value);
+ if (error.Fail())
+ return SendErrorResponse (69);
+
// Build the reginfos response.
StreamGDBRemote response;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13859.37843.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151020/d5fbd0d6/attachment.bin>
More information about the lldb-commits
mailing list