[Lldb-commits] [PATCH] D88796: [lldb] Initial version of FreeBSD remote process plugin

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 8 07:03:31 PDT 2020


mgorny added inline comments.


================
Comment at: lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:82
 void ProcessFreeBSD::Initialize() {
-  static llvm::once_flag g_once_flag;
+  if (!getenv("FREEBSD_REMOTE_PLUGIN")) {
+    static llvm::once_flag g_once_flag;
----------------
labath wrote:
> mgorny wrote:
> > labath wrote:
> > > I would expect that the check above is sufficient, is it not?
> > Could you be more specific? I'm pretty sure I had to do this or otherwise the old plugin ended up being used. This is also how windows does it. 
> Hmm... interesting. But windows does not have the check in PlatformWindows. Does that mean that check is redundant? I find it strange that we need to check this at two places..
That Platform check really means to preserve the old behavior. I don't really know whether it is really needed or not, I've presumed this is safer to do.


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

https://reviews.llvm.org/D88796



More information about the lldb-commits mailing list