Depends on D85070.
I don't think PTDecoder is structured very well, and the name is also misleading,
as 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 fixes 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.
clang-tidy: warning: header guard does not follow preferred style [llvm-header-guard]
not useful