[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:36:29 PDT 2020


wallace added inline comments.


================
Comment at: lldb/source/Target/Thread.cpp:1617-1627
+void Thread::DumpTraceInstructions(Stream &s, size_t count,
+                                   size_t start_position) const {
+  if (!GetProcess()->GetTarget().GetTrace()) {
+    s << "error: no trace in this target\n";
+    return;
+  }
+  s.Printf("thread #%u: tid = %" PRIu64 ", total instructions = 1000\n",
----------------
labath wrote:
> Given the intended design of having one process (and thread) class serve multiple trace types, can this function do anything useful besides calling into the Trace object to perform trace-specific dumping ?
> 
> And if it cannot, couldn't we just skip it have have callers call the relevant Trace method directly?
That's a very good point! There's really no need to have this method here


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