[Lldb-commits] [PATCH] D55038: [Reproducers] Change how reproducers are initialized.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 30 04:06:16 PST 2018


labath added a comment.

In D55038#1314026 <https://reviews.llvm.org/D55038#1314026>, @JDevlieghere wrote:

> Test didn't run. Is there a way to REQUIRE either darwin or linux?


I think the canonical way to do that would be to define a new feature in lit, which gets set when the target supports remote debugging and then use that feature in the REQUIRES directive.



================
Comment at: source/Utility/Reproducer.cpp:41-42
+Reproducer::Reproducer(ReproducerMode mode, llvm::Optional<FileSpec> root) {
+  // It's unfortunate that we have to do so much I/O here that can fail. The
+  // best we can do is not initialize the reproducer.
+  switch (mode) {
----------------
JDevlieghere wrote:
> labath wrote:
> > It should be possible to bubble this all the way up to the `SBDebugger::Initialize` call. Is there a reason to not do that?
> Do you mean having the private Initialize function return an error (and an SBError for the SB variant)?
Yes, that's what I meant. Up until now, our initialization functions were mostly just hooking up various pointers, which are things that can't (shouldn't) fail, but if now a simple typo in the reproducer path can cause the initialization to fail, then I think it would be good to report that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55038/new/

https://reviews.llvm.org/D55038





More information about the lldb-commits mailing list