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;
 


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;
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to