Remove the last manually constructed packet from gdb-remote register context + small...
authorPavel Labath <labath@google.com>
Fri, 19 Aug 2016 12:31:49 +0000 (12:31 +0000)
committerPavel Labath <labath@google.com>
Fri, 19 Aug 2016 12:31:49 +0000 (12:31 +0000)
commitb42b48e051e9aaa374fe6da51acb15c7500072ca
tree111add2ee72fa9e25687a80a993567b54d297e49
parentb8824a5d3f2f8d7a687520c4db641c4d53dc02a5
Remove the last manually constructed packet from gdb-remote register context + small refactor

Summary:
The tricky part here was that the exisiting implementation of WriteAllRegisters was expecting
hex-encoded data (as that was what the first implementation I replaced was using, but here we had
binary data to begin with. I thought the read/write register functions would be more useful if
they handled the hex-encoding themselves (all the other client functions provide the responses in
a more-or-less digested form). The read functions return a DataBuffer, so they can allocate as
much memory as they need to, while the write functions functions take an llvm::ArrayRef, as that
can be constructed from pretty much anything.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D23659

llvm-svn: 279232
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp