[lldb] [gdb-remote client] Refactor handling qSupported
authorMichał Górny <mgorny@moritz.systems>
Thu, 8 Apr 2021 22:18:09 +0000 (00:18 +0200)
committerMichał Górny <mgorny@moritz.systems>
Mon, 12 Apr 2021 22:23:07 +0000 (00:23 +0200)
commit3842de49f6551f597b4c7c78caa8ba7003755cec
tree2905e0a9108493d8d08050f3c236cfe582817823
parentc5fda0e6629fb4674b9e2e80cfd360c2758bd136
[lldb] [gdb-remote client] Refactor handling qSupported

Refactor the qSupported handler to split the reply into an array,
and identify features within the array rather than searching the string
for partial matches.  While at it, use StringRef.split() to process
the compression list instead of reinventing the wheel.

Switch the arguments to MaybeEnableCompression() to use an ArrayRef
of StringRefs to simplify parameter passing from GetRemoteQSupported().

Differential Revision: https://reviews.llvm.org/D100146
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h