[all-commits] [llvm/llvm-project] 628277: [lldb/Reproducer] Add version check

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Dec 3 07:54:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 62827737acd878af6cd8930758b0d6f297173f40
      https://github.com/llvm/llvm-project/commit/62827737acd878af6cd8930758b0d6f297173f40
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M lldb/include/lldb/API/SBReproducer.h
    M lldb/source/API/SBReproducer.cpp
    A lldb/test/Shell/Reproducer/TestVersionCheck.test
    M lldb/tools/driver/Driver.cpp
    M lldb/tools/driver/Options.td

  Log Message:
  -----------
  [lldb/Reproducer] Add version check

To ensure a reproducer works correctly, the version of LLDB used for
capture and replay must match. Right now the reproducer already contains
the LLDB version. However, this is purely informative. LLDB will happily
replay a reproducer generated with a different version of LLDB, which
can cause subtle differences.

This patch adds a version check which compares the current LLDB version
with the one in the reproducer. If the version doesn't match, LLDB will
refuse to replay. It also adds an escape hatch to make it possible to
still replay the reproducer without having to mess with the recorded
version. This might prove useful when you know two versions of LLDB
match, even though the version string doesn't. This behavior is
triggered by passing a new flag -reproducer-skip-version-check to the
lldb driver.

Differential revision: https://reviews.llvm.org/D70934




More information about the All-commits mailing list