[Lldb-commits] [PATCH] D23659: Remove the last manually constructed packet from gdb-remote register context + small refactor

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 18 06:03:02 PDT 2016


labath created this revision.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.

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.

https://reviews.llvm.org/D23659

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
  source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
  unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23659.68525.patch
Type: text/x-patch
Size: 24554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160818/d5023696/attachment-0001.bin>


More information about the lldb-commits mailing list