[Lldb-commits] [PATCH] D85158: [intel-pt] Refactor 3: refactor PTDecoder into SBPTProcess
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 3 13:48:57 PDT 2020
wallace created this revision.
wallace added reviewers: clayborg, kusmour.
Herald added subscribers: lldb-commits, mgorny.
Herald added a project: LLDB.
wallace requested review of this revision.
Herald added a subscriber: JDevlieghere.
Depends on D85070 <https://reviews.llvm.org/D85070>.
I don't think PTDecoder is structured very well, and the name is also misleading,
and it doesn't just "decode". Given that the Python API generation has been
broken for a long time and that one of my recent patches fix it, I assume
there's no problem in changing the API, as there has been no users.
A first fundamental change I want to do is to stop having PTDecoder as a top
level class that receives an SBProcess for any action it needs to do. The
existing way requires a good amount of boilerplate code here and there with
little to no benefit.
Instead, I'm renaming it into SBPTProcess. I think the SB is consistent with the
LLDB SB API, and this class now directly manages one SBProcess. This means that
whenever you want to trace or decode an SBProcess, you create a SBPTProcess
class, which is easier to reason about in an OOP way.
I've updated the test accordingly, and I've noticed that the code is now much
simpler, with less faiture points and checks.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 59566 bytes
Desc: not available
More information about the lldb-commits