labath added a subscriber: labath.

================
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
----------------
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.


http://reviews.llvm.org/D12420



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to