[Lldb-commits] [PATCH] D100153: [lldb] [Process] Introduce protocol extension support API

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 21 03:41:47 PDT 2021


mgorny marked 4 inline comments as done.
mgorny added inline comments.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:3562-3567
+        (process_features & NativeProcessProtocol::Extension::fork) ==
+            NativeProcessProtocol::Extension::fork)
+      m_fork_events_supported = true;
+    else if (x == "vfork-events+" &&
+             (process_features & NativeProcessProtocol::Extension::vfork) ==
+                 NativeProcessProtocol::Extension::vfork)
----------------
mgorny wrote:
> labath wrote:
> > Maybe drop the `== Extension::[v]fork` part?
> Can't do that, `enum class` doesn't convert to `bool`. In fact, I tried a few more or less crazy ideas to make this work, and none worked ;-).
The next best thing I was able to do is check `!= NativeProcessProtocol::Extension()` which is a little bit shorter. Maybe I could try adding `operator==` and `!=` against, say, `nullptr` or some special constant?


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

https://reviews.llvm.org/D100153



More information about the lldb-commits mailing list