[Lldb-commits] [lldb] [LLDB][Statistics] Add coreFilePath to Target stats (PR #161448)

Jacob Lalonde via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 1 15:48:49 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());
----------------
Jlalond wrote:

> FWIW I don't think we should ever include full paths as that can contain PII such as the name of the home directory.

Recommendations on this patch then? I personally prefer the path but I never considered the privacy concerns, which makes sense for Apple. I'd be comfortable compromising with the file name.

https://github.com/llvm/llvm-project/pull/161448


More information about the lldb-commits mailing list