[Lldb-commits] [PATCH] D23553: Move packet construction from GDBRemoteRegisterContext go the communication class

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 16 06:12:34 PDT 2016


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

When saving/restoring registers the GDBRemoteRegisterContext class was manually constructing
the register save/restore packets. This creates appropriate helper functions in
GDBRemoteCommunicationClient, and switches the class to use those. It also removes what a
duplicate packet send in some of those functions, a thing that I can only attribute to a bad
merge artefact.

I also add a test framework for testing gdb-remote client functionality and add tests for the new
functions I introduced. I'd like to be able to test the register context changes in isolation as
well, but currently there doesn't seem to be a way to reasonably construct a standalone register
context object, so we'll have to rely on the end-to-end tests to verify that.

https://reviews.llvm.org/D23553

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  unittests/Process/gdb-remote/CMakeLists.txt
  unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
  unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
  unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
  unittests/Process/gdb-remote/GDBRemoteTestUtils.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23553.68169.patch
Type: text/x-patch
Size: 38904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160816/70669205/attachment-0001.bin>


More information about the lldb-commits mailing list