[lldb] [gdb-remote server] Refactor handling qSupported
authorMichał Górny <mgorny@moritz.systems>
Thu, 8 Apr 2021 21:15:38 +0000 (23:15 +0200)
committerMichał Górny <mgorny@moritz.systems>
Tue, 13 Apr 2021 10:12:25 +0000 (12:12 +0200)
commitaab81c2f40d2098f9014473a1e7c8fb7b074360b
tree9765515ab5fb2c9fdcddb6f20aa0e3fb6c2a2e37
parent4217e6bf95f56d7c11684403687d20a7ef79ba09
[lldb] [gdb-remote server] Refactor handling qSupported

Refactor handling qSupported to use a virtual HandleFeatures() method.
The client-provided features are split into an array and passed
to the method.  The method returns an array of server features that are
concatenated into the qSupported response to the server.

The base implementation of HandleFeatures()
in GDBRemoteCommunicationServerCommon now includes only flags common
to both platform server and llgs, while llgs-specific flags are inserted
in GDBRemoteCommunicationServerLLGS.

Differential Revision: https://reviews.llvm.org/D100140
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h