Skip to content

Commit 5af3c45

Browse files
committed
cleanup
1 parent 0aab7b9 commit 5af3c45

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lldb/source/Target/Process.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,13 +1069,8 @@ bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
10691069
std::lock_guard<std::mutex> guard(m_exit_status_mutex);
10701070
telemetry::ScopedDispatcher<telemetry::ProcessExitInfo> helper;
10711071

1072-
// Only dispatch telemetry for a non-success case to reduce
1073-
// chances of slowing down the code.
1074-
// FIXME: Remove this conditional monitoring as it means we lose the ability
1075-
// to monitor exit-operations' time for the average case.
1076-
//if (status != 0)
1077-
{
10781072
UUID module_uuid;
1073+
// Need this check because the pointer may not be valid at this point.
10791074
if (TargetSP target_sp = m_target_wp.lock()) {
10801075
helper.SetDebugger(&target_sp->GetDebugger());
10811076
if (ModuleSP mod = target_sp->GetExecutableModule())
@@ -1093,7 +1088,7 @@ bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
10931088
info->module_uuid = module_uuid;
10941089
info->pid = m_pid;
10951090
});
1096-
}
1091+
10971092
Log *log(GetLog(LLDBLog::State | LLDBLog::Process));
10981093
LLDB_LOG(log, "(plugin = {0} status = {1} ({1:x8}), description=\"{2}\")",
10991094
GetPluginName(), status, exit_string);

0 commit comments

Comments
 (0)