[Lldb-commits] [PATCH] D100459: [lldb] [gdb-remote client] Refactor SetCurrentThread*()

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 14 03:01:04 PDT 2021

mgorny created this revision.
mgorny added reviewers: labath, emaste, krytarowski.
mgorny requested review of this revision.

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.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100459.337386.patch
Type: text/x-patch
Size: 5096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210414/b0fc4d7e/attachment.bin>

More information about the lldb-commits mailing list