[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 9 17:59:39 PDT 2020


wallace marked 3 inline comments as done.
wallace added inline comments.


================
Comment at: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp:61
+                                     const std::vector<TargetSP> &targets) {
+  TraceSP trace_instance(new TraceIntelPT(pt_cpu, targets));
+  for (const TargetSP &target_sp : targets)
----------------
labath wrote:
> auto trace_instance = std::make_shared<TraceIntelPT>(...)
I can't do this because the constructor is private (specifically to std::shared_ptr).
I want to have this method as the main way to create instances because I need to use shared_ptr of this instance to set up everything correctly, and I can't do it from the constructor itself.
I've checked ways to make std::make_shared<TraceIntelPT>(...), but it looks like too much code that outweighs the benefit of the fancy allocator.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88769/new/

https://reviews.llvm.org/D88769



More information about the lldb-commits mailing list