[Lldb-commits] [lldb] r246557 - Make ProcessGDBRemote get a //copy// of platform Unix signals.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 1 09:58:46 PDT 2015


Author: chaoren
Date: Tue Sep  1 11:58:45 2015
New Revision: 246557

URL: http://llvm.org/viewvc/llvm-project?rev=246557&view=rev
Log:
Make ProcessGDBRemote get a //copy// of platform Unix signals.

Summary: Update to http://reviews.llvm.org/rL243618.

Reviewers: jaydeep, clayborg

Subscribers: labath, tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D12420

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

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=246557&r1=246556&r2=246557&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Tue Sep  1 11:58:45 2015
@@ -1432,7 +1432,7 @@ public:
     Signal (int signal);
 
     void
-    SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
+    SetUnixSignals(lldb::UnixSignalsSP &&signals_sp);
 
     const lldb::UnixSignalsSP &
     GetUnixSignals();

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=246557&r1=246556&r2=246557&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Tue Sep  1 11:58:45 2015
@@ -352,8 +352,7 @@ ProcessElfCore::Clear()
     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

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=246557&r1=246556&r2=246557&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Sep  1 11:58:45 2015
@@ -2904,6 +2904,12 @@ ProcessGDBRemote::SetLastStopPacket (con
     }
 }
 
+void
+ProcessGDBRemote::SetUnixSignals(const UnixSignalsSP &signals_sp)
+{
+    Process::SetUnixSignals(std::make_shared<GDBRemoteSignals>(signals_sp));
+}
+
 //------------------------------------------------------------------
 // Process Queries
 //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=246557&r1=246556&r2=246557&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Tue Sep  1 11:58:45 2015
@@ -152,6 +152,9 @@ public:
     void
     RefreshStateAfterStop() override;
 
+    void
+    SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
+
     //------------------------------------------------------------------
     // Process Queries
     //------------------------------------------------------------------

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=246557&r1=246556&r2=246557&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Sep  1 11:58:45 2015
@@ -4120,7 +4120,7 @@ Process::Signal (int signal)
 }
 
 void
-Process::SetUnixSignals (const UnixSignalsSP &signals_sp)
+Process::SetUnixSignals(UnixSignalsSP &&signals_sp)
 {
     assert (signals_sp && "null signals_sp");
     m_unix_signals_sp = signals_sp;




More information about the lldb-commits mailing list