[Lldb-commits] [PATCH] D131275: [lldb] Make Process and subclass constructors protected

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 8 06:10:13 PDT 2022


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/include/lldb/Target/Process.h:478-487
+protected:
   /// Construct with a shared pointer to a target, and the Process listener.
   /// Uses the Host UnixSignalsSP by default.
   Process(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
 
   /// Construct with a shared pointer to a target, the Process listener, and
   /// the appropriate UnixSignalsSP for the process.
----------------
Just move this to the existing protected section on line 2500 (boy is this class big). Too many sections makes it hard to find what's the visibility of something.


================
Comment at: lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h:41
+protected:
   ProcessWindows(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
 
----------------
same here


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h:52
+protected:
   ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
 
----------------
and here


================
Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.h:54
+protected:
   ScriptedProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
                   const ScriptedProcess::ScriptedProcessInfo &launch_info,
----------------
and here


================
Comment at: lldb/unittests/Expression/DWARFExpressionTest.cpp:331
   struct MockProcess : Process {
-    using Process::Process;
+    MockProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
+        : Process(target_sp, listener_sp) {}
----------------
huh, I did not expect this to be necessary. Inherited constructors are weird...


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

https://reviews.llvm.org/D131275



More information about the lldb-commits mailing list