[lldb/Reproducers] Support new replay mode: passive replay
Support passive replay as proposed in the RFC [1] on lldb-dev and described in more detail on the lldb website [2]. This patch extends the LLDB_RECORD macros to re-invoke the current function with arguments deserialized from the reproducer. This relies on the function being called in the exact same order as during replay. It uses the same mechanism to toggle the API boundary as during recording, which guarantees that only boundary crossing calls are replayed. Another major change is that before this patch we could ignore the result of an API call, because we only cared about the observable behavior. Now we need to be able to return the replayed result to the SWIG bindings. We reuse a lot of the recording infrastructure, which can be a little confusing. We kept the existing naming to limit the amount of churn, but might revisit that in a future patch. [1] http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html [2] https://lldb.llvm.org/resources/reproducers.html Differential revision: https://reviews.llvm.org/D77602
Loading
Please sign in to comment