[Lldb-commits] [lldb] [LLDB][Statistics] Add coreFilePath to Target stats (PR #161448)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 1 16:17:11 PDT 2025
================
@@ -202,6 +202,10 @@ TargetStats::ToJSON(Target &target,
if (process_sp->GetDynamicLoader())
dyld_plugin_name = process_sp->GetDynamicLoader()->GetPluginName();
target_metrics_json.try_emplace("dyldPluginName", dyld_plugin_name);
+
+ if (process_sp->GetCoreFile())
+ target_metrics_json.try_emplace("coreFilePath",
+ process_sp->GetCoreFile().GetPath());
----------------
JDevlieghere wrote:
To be clear: we're not collecting these statistics, but if we were this would become an issue.
Using the basename seems like a good compromise. If you somehow really need a path, you can try to obfuscate the home directory but that seems overkill here.
As a concrete example, crash logs on our platform remove everything after `/Users/` and before the basename, so something like `/Users/jonas/Downloads/a.out` becomes `/Users/USER/a.out`. However, that begs the question of how meaningful that path still is...
https://github.com/llvm/llvm-project/pull/161448
More information about the lldb-commits
mailing list