aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2022-10-18 23:03:48 +0000
committerMehdi Amini <joker.eph@gmail.com>2023-03-06 15:58:26 +0100
commit7fbcf10e2e7a408dc551cab5c180ebc2fb679454 (patch)
treebc1ee5b415a943b3754b3723580a40230f07a675 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
parent5c2716b87acd8603de5b8d280ee857524d6d81bd (diff)
downloadllvm-7fbcf10e2e7a408dc551cab5c180ebc2fb679454.zip
llvm-7fbcf10e2e7a408dc551cab5c180ebc2fb679454.tar.gz
llvm-7fbcf10e2e7a408dc551cab5c180ebc2fb679454.tar.bz2
Change the DebugAction paradigm to delegate the control to the handler
At the moment, we invoke `shouldExecute()` that way: ``` if (manager.shouldExecute<DebugAction>(currentOp) { // apply a transformation … } ``` In this sequence, the manager isn’t involved in the actual execution of the action and can’t develop rich instrumentations. Instead the API could let the control to the handler itself: ``` // Execute the action under the control of the manager manager.execute<DebugAction>(currentOp, [&]() { // apply the transformation in this callback … }); ``` This inversion of control (by injecting a callback) allows handlers to implement potentially new interesting features: for example, snapshot the IR before and after the action, or record an action execution time. More importantly, it will allow to capture the nesting execution of actions. On the other side: handlers receives now a DebugAction object that wraps generic information (tag and description especially) as well as action-specific data. Finally, the DebugActionManager is now enabled in release builds as well. Differential Revision: https://reviews.llvm.org/D144808
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h')
0 files changed, 0 insertions, 0 deletions