[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 28 06:21:54 PST 2025


labath wrote:

> @labath
> 
> > IOW, can we drop the exit_desc field from this struct?
> 
> Well, we need a way to distinguish the start and the exit entries How about just keeping `exit_code` (which is set to zero)

You could distinguish them with a bool or enum field. I don't think an exit_code field makes sense if it's always going to be set to zero. I think it would make sense if you set it to `GetCommandInterpreter().GetQuitExitCode()`.

> 
> > I still think it's important to have a simple and succinct way to check whether telemetry is "actually" enabled at a given moment
> 
> We can have a `static TelemetryManager::TelemetryCurrentEnabled()` which does the check.

Maybe. Or maybe `TelemetryManager::GetInstanceIfEnabled` (not necessarily with that name) so you don't have to follow this up with a call to GetInstance(). Let's see how the code develops...

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


More information about the lldb-commits mailing list