Skip to content

Commit 0aab7b9

Browse files
committed
check .lock() on the weak ptr Target
1 parent 10528c9 commit 0aab7b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Target/Process.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,10 +1073,10 @@ bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
10731073
// chances of slowing down the code.
10741074
// FIXME: Remove this conditional monitoring as it means we lose the ability
10751075
// to monitor exit-operations' time for the average case.
1076-
if (status != 0) {
1076+
//if (status != 0)
1077+
{
10771078
UUID module_uuid;
1078-
TargetSP target_sp(Debugger::FindTargetWithProcessID(m_pid));
1079-
if (target_sp) {
1079+
if (TargetSP target_sp = m_target_wp.lock()) {
10801080
helper.SetDebugger(&target_sp->GetDebugger());
10811081
if (ModuleSP mod = target_sp->GetExecutableModule())
10821082
module_uuid = mod->GetUUID();

0 commit comments

Comments
 (0)