This is an archive of the discontinued LLVM Phabricator instance.

[Reproducer] Add version check
ClosedPublic

Authored by JDevlieghere on Dec 2 2019, 5:46 PM.

Details

Summary

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.

Diff Detail

Event Timeline

JDevlieghere created this revision.Dec 2 2019, 5:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2019, 5:46 PM
labath accepted this revision.Dec 3 2019, 1:46 AM

Seems legit.

This revision is now accepted and ready to land.Dec 3 2019, 1:46 AM
This revision was automatically updated to reflect the committed changes.