[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>
Tue, 13 Apr 2021 09:20:11 +0000 (11:20 +0200)
commitff31af4f55af65d173cedcd2f09063c81c8f4f12
tree4b46ec939cf845d2c991ab2db99fa1c7ad553359
parentef30179efff24a02d5f7a3380a7f3cab247b1338
[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