[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 26 22:52:25 PDT 2020
wallace added inline comments.
================
Comment at: lldb/include/lldb/Target/Target.h:1105
+ void SetTrace(const lldb::TraceSP &trace_sp);
+
----------------
wallace wrote:
> JDevlieghere wrote:
> > Who owns the trace? If there's a 1:1 relationship between a trace and a target, can we make the target its owner? I'm trying to avoid adding shared pointers if possible.
> Well, there's a 1 to many relationship. Many targets can own the same trace object, as a single trace can have data of several processes. On the other hand, there should no other object that could own a trace. I haven't found a better solution :(
What do you think about changing GetTrace() to returns a Trace & instead of TraceSP &, so that no other object can share the ownership?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86670/new/
https://reviews.llvm.org/D86670
More information about the lldb-commits
mailing list