1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[lldb] Add reproducer verifier

Add a reproducer verifier that catches:

 - Missing or invalid home directory
 - Missing or invalid working directory
 - Missing or invalid module/symbol paths
 - Missing files from the VFS

The verifier is enabled by default during replay, but can be skipped by
passing --reproducer-no-verify.

Differential revision: https://reviews.llvm.org/D86497
This commit is contained in:
Jonas Devlieghere 2020-08-31 15:13:49 -07:00
parent 224abd6796
commit a1a9cb7026
2 changed files with 15 additions and 0 deletions

View File

@ -749,6 +749,10 @@ public:
StringRef getExternalContentsPrefixDir() const; StringRef getExternalContentsPrefixDir() const;
void setFallthrough(bool Fallthrough);
std::vector<llvm::StringRef> getRoots() const;
void dump(raw_ostream &OS) const; void dump(raw_ostream &OS) const;
void dumpEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const; void dumpEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

View File

@ -1159,6 +1159,17 @@ StringRef RedirectingFileSystem::getExternalContentsPrefixDir() const {
return ExternalContentsPrefixDir; return ExternalContentsPrefixDir;
} }
void RedirectingFileSystem::setFallthrough(bool Fallthrough) {
IsFallthrough = Fallthrough;
}
std::vector<StringRef> RedirectingFileSystem::getRoots() const {
std::vector<StringRef> R;
for (const auto &Root : Roots)
R.push_back(Root->getName());
return R;
}
void RedirectingFileSystem::dump(raw_ostream &OS) const { void RedirectingFileSystem::dump(raw_ostream &OS) const {
for (const auto &Root : Roots) for (const auto &Root : Roots)
dumpEntry(OS, Root.get()); dumpEntry(OS, Root.get());