summaryrefslogtreecommitdiff
path: root/lldb/tools
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-11-27 22:11:02 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-11-27 22:11:02 +0000
commitebb642d99e0a05662472280f187c96a9f4cda6ff (patch)
tree153ab9dca15b39075c28daf26b82bc21a8e7f8f6 /lldb/tools
parent1f5878092f150febab4a80b99b564193bb7a5fdc (diff)
[Reproducers] Improve reproducer API and add unit tests.
When I landed the initial reproducer framework I knew there were some things that needed improvement. Rather than bundling it with a patch that adds more functionality I split it off into this patch. I also think the API is stable enough to add unit testing, which is included in this patch as well. Other improvements include: - Refactor how we initialize the loader and generator. - Improve naming consistency: capture and replay seems the least ambiguous. - Index providers by name and make sure there's only one of each. - Add convenience methods for creating and accessing providers. Differential revision: https://reviews.llvm.org/D54616
Diffstat (limited to 'lldb/tools')
-rw-r--r--lldb/tools/driver/Driver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index 31425c1b963..2b985e548f3 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -368,7 +368,9 @@ SBError Driver::ProcessArgs(const opt::InputArgList &args, FILE *out_fh,
auto optarg = arg->getValue();
SBFileSpec file(optarg);
if (file.Exists()) {
- m_debugger.SetReproducerPath(optarg);
+ SBError repro_error = m_debugger.ReplayReproducer(optarg);
+ if (repro_error.Fail())
+ return repro_error;
} else {
error.SetErrorStringWithFormat("file specified in --reproducer "
"(-z) option doesn't exist: '%s'",