[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 1 12:16:50 PDT 2020


clayborg added a comment.

In D85705#2305994 <https://reviews.llvm.org/D85705#2305994>, @labath wrote:

> I have two high-level remarks/questions about this:
>
> - I am surprised that it was not necessary to create a special process plugin for this purpose. I have a feeling one will be necessary sooner or later because of the need to customize the step/continue/etc. flows. Currently, this will probably produce very bizarre if one tries to execute those commands. The reason I'm bringing this up is because of the `Target::GetTrace` method being added in the next patch. If there is a trace-specific process class, then it might make sense for this class to hold the trace object instead of adding the GetTrace method on every Target object out there even though most targets will have that null. I don't know if that will really be the case, but I think it's something worth keeping in mind as you work on the subsequent patches.

Eventually we should probably have a HistoryProcess class, much like the HistoryThread. This new class could then be used as a base class for the ProcessMachCore and ProcessELFCore and ProcessMinidump. This base class can then stub out the flow control (continue, step, stop etc) and all other virtual methods that are stubbed out in these classes. It can also add accessors for adding HistoryThread objects if needed. So we should probable move this way.

When we have a live process, we will use the current process when we can, but the process and target will need to coordinate to be able to know if we have reversed stepped into the past so that the flow control (forward/reverse continue, forward/reverse step) can do the right things.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85705



More information about the lldb-commits mailing list