diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index 65b29b9b3c94..8c106cdaee51 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -1432,7 +1432,7 @@ public: Signal (int signal); void - SetUnixSignals(const lldb::UnixSignalsSP &signals_sp); + SetUnixSignals(lldb::UnixSignalsSP &&signals_sp); const lldb::UnixSignalsSP & GetUnixSignals(); diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index a9dfbb204e1c..ebd36b42e583 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -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(); - SetUnixSignals(s_default_unix_signals_sp); + SetUnixSignals(std::make_shared()); } void diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 2cca86926d4b..aac3df162c12 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -2904,6 +2904,12 @@ ProcessGDBRemote::SetLastStopPacket (const StringExtractorGDBRemote &response) } } +void +ProcessGDBRemote::SetUnixSignals(const UnixSignalsSP &signals_sp) +{ + Process::SetUnixSignals(std::make_shared(signals_sp)); +} + //------------------------------------------------------------------ // Process Queries //------------------------------------------------------------------ diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index f7bbb445374a..c2a99ba29141 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -152,6 +152,9 @@ public: void RefreshStateAfterStop() override; + void + SetUnixSignals(const lldb::UnixSignalsSP &signals_sp); + //------------------------------------------------------------------ // Process Queries //------------------------------------------------------------------ diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 268f408b6dde..0185a8d5f580 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -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;