[all-commits] [llvm/llvm-project] 950a8a: [lldb/Reproducers] Support new replay mode: passiv...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon Apr 20 09:46:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 950a8aa165ebe7c7b8b8b83b2c6c60af5fad89d7
      https://github.com/llvm/llvm-project/commit/950a8aa165ebe7c7b8b8b83b2c6c60af5fad89d7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-04-20 (Mon, 20 Apr 2020)

  Changed paths:
    M lldb/include/lldb/Utility/Reproducer.h
    M lldb/include/lldb/Utility/ReproducerInstrumentation.h
    M lldb/source/API/SBDebugger.cpp
    M lldb/source/API/SBReproducer.cpp
    M lldb/source/API/SBReproducerPrivate.h
    M lldb/source/Utility/Reproducer.cpp
    M lldb/source/Utility/ReproducerInstrumentation.cpp
    M lldb/unittests/Utility/ReproducerInstrumentationTest.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list