[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 9 09:58:30 PDT 2024
================
@@ -0,0 +1,66 @@
+//===-- RealpathPrefixes.cpp ----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/RealpathPrefixes.h"
+
+#include "lldb/Target/Statistics.h"
+#include "lldb/Target/Target.h"
----------------
royitaqi wrote:
Thanks for all the inspiring options you mentioned, especially the aliasing constructor which I didn't know.
> It may also be possible to keep a record of the statistics on the inside the object itself, and only later add it to the ones in the Target. This would make sense if there's a natural place where you can insert the call to gather the stats (either when the object is destructed, when the stats are requested, etc.).
I went for this approach, because it's the easiest to reason about lifecycle and there *is* a natural location to gather these stats. This can also be easily refactored if/when we move statistics code into Utility.
https://github.com/llvm/llvm-project/pull/102223
More information about the lldb-commits
mailing list