-
- Downloads
[lldb] [gdb-remote client] Refactor SetCurrentThread*()
Refactor SetCurrentThread() and SetCurrentThreadForRun() to reduce code duplication and simplify it. Both methods now call common SendSetCurrentThreadPacket() that implements the common protocol exchange part (the only variable is sending `Hg` vs `Hc`) and returns the selected TID. The logic is rewritten to use a StreamString instead of snprintf(). A side effect of the change is that thread-id sent is now zero-padded. However, this should not have practical impact on the server as both forms are equivalent. Differential Revision: https://reviews.llvm.org/D100459
Showing
- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 29 additions, 51 deletions...ugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h 2 additions, 0 deletions...Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
- lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp 2 additions, 2 deletions...s/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
Loading