[Lldb-commits] [PATCH] D70934: [Reproducer] Add version check

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 2 17:47:42 PST 2019


JDevlieghere created this revision.
JDevlieghere added a reviewer: labath.
Herald added subscribers: teemperor, abidh.
Herald added a project: LLDB.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D70934

Files:
  lldb/include/lldb/API/SBReproducer.h
  lldb/source/API/SBReproducer.cpp
  lldb/test/Shell/Reproducer/TestVersionCheck.test
  lldb/tools/driver/Driver.cpp
  lldb/tools/driver/Options.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70934.231802.patch
Type: text/x-patch
Size: 4503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191203/f637a48a/attachment.bin>


More information about the lldb-commits mailing list