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

llvm-svn: 246557
This commit is contained in:
Chaoren Lin 2015-09-01 16:58:45 +00:00
parent 0ca250853c
commit c963a222f1
5 changed files with 12 additions and 4 deletions

View File

@ -1432,7 +1432,7 @@ public:
Signal (int signal);
void
SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
SetUnixSignals(lldb::UnixSignalsSP &&signals_sp);
const lldb::UnixSignalsSP &
GetUnixSignals();

View File

@ -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

View File

@ -2904,6 +2904,12 @@ ProcessGDBRemote::SetLastStopPacket (const StringExtractorGDBRemote &response)
}
}
void
ProcessGDBRemote::SetUnixSignals(const UnixSignalsSP &signals_sp)
{
Process::SetUnixSignals(std::make_shared<GDBRemoteSignals>(signals_sp));
}
//------------------------------------------------------------------
// Process Queries
//------------------------------------------------------------------

View File

@ -152,6 +152,9 @@ public:
void
RefreshStateAfterStop() override;
void
SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
//------------------------------------------------------------------
// Process Queries
//------------------------------------------------------------------

View File

@ -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;