[Lldb-commits] [PATCH] D53532: [FileSystem] Extend file system and have it use the VFS.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 30 13:21:02 PDT 2018

JDevlieghere added a comment.

In https://reviews.llvm.org/D53532#1280880, @labath wrote:

> Yes, right now it certainly seems to be the case that we parse cmdline late in the game. However, it's not clear to me whether that has to be the case.
> I can't say I have thought this through to the end, but it seems to me that setting up the repro engine should be one of the first (if not THE first) SB calls from the driver. Right now the parsing happens too late (e.g. we already have an SBDebugger instance created at that point). I am not sure you could safely initialize record/replay at that point, even if you got FileSystem switching working.
> Architecturally, the cleanest solution to me seems to be doing the command line parsing (even if it's just the repro-related args) before SBDebugger::Initialize, and then have special versions of the `Initialize` function like `Initialize(args_for_record)` and `Initialize(args_for_replay)`. The interesting repro-related stuff would then happen in these functions, which can then call the `Initialize` functions of relevant components (like `FileSystem`) and pass appropriate arguments.
> However, I can't say how would that fit into your intended design or any code you already have implemented.

Sounds reasonable. Let's go with the static Initialize approach now and figure out the details about initializing the reproducer later.


More information about the lldb-commits mailing list