[Lldb-commits] [PATCH] D100262: [lldb] [gdb-remote client] Support switching PID along with TID

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 1 14:16:00 PDT 2021


mgorny added inline comments.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h:337
 
-  llvm::Optional<uint64_t> SendSetCurrentThreadPacket(uint64_t tid, char type);
+  llvm::Optional<std::pair<uint64_t, uint64_t>>
+  SendSetCurrentThreadPacket(uint64_t tid, uint64_t pid, char type);
----------------
JDevlieghere wrote:
> I generally prefer a struct with named fields over an unnamed pair. Do you think that would help readability here?
While I was typing that I'm fine either way, I've noticed that the function takes tid+pid but returns pid+tid, so I suppose it could be confusing. I'll switch over to structs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100262/new/

https://reviews.llvm.org/D100262



More information about the lldb-commits mailing list