[Lldb-commits] [PATCH] D12420: Make ProcessGDBRemote get a //copy// of platform Unix signals.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 28 13:54:43 PDT 2015


chaoren marked an inline comment as done.

================
Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:853
@@ -852,3 +852,3 @@
         if (platform_sp && platform_sp->IsConnected())
-            SetUnixSignals(platform_sp->GetUnixSignals());
+            SetUnixSignals(std::make_shared<GDBRemoteSignals>(platform_sp->GetUnixSignals()));
         else
----------------
labath wrote:
> tberghammer wrote:
> > I think it would be better to change SetUnixSignals to create the copy (or force the client side copy with some magic with rvalue references) because this error will happen almost every time somebody calls SetUnixSignals.
> If the platform is supposed to hold signals, which are not to be changed by its users, I would have it hand out `std::shared_ptr<CONST UnixSignals>` (or even `const UnixSignals &` ?). Then the users will be forced to make a copy if they want to do anything to them.
> If the platform is supposed to hold signals, which are not to be changed by its users

I think in my original discussion with Greg, we decided that it would be a good idea if we allow setting suppress/stop/notify for the platform signal set, and will be inherited by any process signal set created from it.


http://reviews.llvm.org/D12420





More information about the lldb-commits mailing list