Revert "[LLDB][Telemetry]Define TargetInfo for collecting data about a target (#127834)"

This reverts commit 04e39ce3fd due to test
breakage.
This commit is contained in:
Pavel Labath
2025-03-19 09:43:17 +01:00
parent 415dd383e4
commit 7dbcdd578c
5 changed files with 9 additions and 134 deletions

View File

@@ -22,7 +22,6 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Progress.h"
#include "lldb/Core/Telemetry.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/DynamicCheckerFunctions.h"
#include "lldb/Expression/UserExpression.h"
@@ -1067,26 +1066,6 @@ const char *Process::GetExitDescription() {
bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
// Use a mutex to protect setting the exit status.
std::lock_guard<std::mutex> guard(m_exit_status_mutex);
telemetry::ScopedDispatcher<telemetry::ProcessExitInfo> helper;
// Find the executable-module's UUID, if available.
Target &target = GetTarget();
helper.SetDebugger(&(target.GetDebugger()));
UUID module_uuid;
if (ModuleSP mod = target.GetExecutableModule())
module_uuid = mod->GetUUID();
helper.DispatchNow([&](telemetry::ProcessExitInfo *info) {
info->module_uuid = module_uuid;
info->pid = m_pid;
info->is_start_entry = true;
info->exit_desc = {status, exit_string.str()};
});
helper.DispatchOnExit([&](telemetry::ProcessExitInfo *info) {
info->module_uuid = module_uuid;
info->pid = m_pid;
});
Log *log(GetLog(LLDBLog::State | LLDBLog::Process));
LLDB_LOG(log, "(plugin = {0} status = {1} ({1:x8}), description=\"{2}\")",