chaoren updated this revision to Diff 33460.
chaoren added a comment.

- Force client side copy.


http://reviews.llvm.org/D12420

Files:
  include/lldb/Target/Process.h
  source/Plugins/Process/elf-core/ProcessElfCore.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Target/Process.cpp

Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -4120,7 +4120,7 @@
 }
 
 void
-Process::SetUnixSignals (const UnixSignalsSP &signals_sp)
+Process::SetUnixSignals(UnixSignalsSP &&signals_sp)
 {
     assert (signals_sp && "null signals_sp");
     m_unix_signals_sp = signals_sp;
Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -850,7 +850,7 @@
     {
         PlatformSP platform_sp = GetTarget().GetPlatform();
         if (platform_sp && platform_sp->IsConnected())
-            SetUnixSignals(platform_sp->GetUnixSignals());
+            
SetUnixSignals(std::make_shared<GDBRemoteSignals>(platform_sp->GetUnixSignals()));
         else
             SetUnixSignals(UnixSignals::Create(GetTarget().GetArchitecture()));
     }
Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp
===================================================================
--- source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -352,8 +352,7 @@
     m_thread_list.Clear();
     m_os = llvm::Triple::UnknownOS;
 
-    static const auto s_default_unix_signals_sp = 
std::make_shared<UnixSignals>();
-    SetUnixSignals(s_default_unix_signals_sp);
+    SetUnixSignals(std::make_shared<UnixSignals>());
 }
 
 void
Index: include/lldb/Target/Process.h
===================================================================
--- include/lldb/Target/Process.h
+++ include/lldb/Target/Process.h
@@ -1432,7 +1432,7 @@
     Signal (int signal);
 
     void
-    SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
+    SetUnixSignals(lldb::UnixSignalsSP &&signals_sp);
 
     const lldb::UnixSignalsSP &
     GetUnixSignals();


Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -4120,7 +4120,7 @@
 }
 
 void
-Process::SetUnixSignals (const UnixSignalsSP &signals_sp)
+Process::SetUnixSignals(UnixSignalsSP &&signals_sp)
 {
     assert (signals_sp && "null signals_sp");
     m_unix_signals_sp = signals_sp;
Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -850,7 +850,7 @@
     {
         PlatformSP platform_sp = GetTarget().GetPlatform();
         if (platform_sp && platform_sp->IsConnected())
-            SetUnixSignals(platform_sp->GetUnixSignals());
+            SetUnixSignals(std::make_shared<GDBRemoteSignals>(platform_sp->GetUnixSignals()));
         else
             SetUnixSignals(UnixSignals::Create(GetTarget().GetArchitecture()));
     }
Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp
===================================================================
--- source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -352,8 +352,7 @@
     m_thread_list.Clear();
     m_os = llvm::Triple::UnknownOS;
 
-    static const auto s_default_unix_signals_sp = std::make_shared<UnixSignals>();
-    SetUnixSignals(s_default_unix_signals_sp);
+    SetUnixSignals(std::make_shared<UnixSignals>());
 }
 
 void
Index: include/lldb/Target/Process.h
===================================================================
--- include/lldb/Target/Process.h
+++ include/lldb/Target/Process.h
@@ -1432,7 +1432,7 @@
     Signal (int signal);
 
     void
-    SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
+    SetUnixSignals(lldb::UnixSignalsSP &&signals_sp);
 
     const lldb::UnixSignalsSP &
     GetUnixSignals();
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to