[Lldb-commits] [PATCH] D65677: [VirtualFileSystem] Support encoding a current working directory in a VFS mapping.
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 5 09:13:28 PDT 2019
JDevlieghere added a comment.
In D65677#1614595 <https://reviews.llvm.org/D65677#1614595>, @sammccall wrote:
> It seems conceptually a little strange to have the working directory be part of a serialized "FS", as it's fundamentally a property of a process and only transiently a property of the VFS.
> I don't know this is fatal (not sure what else the RedirectingFileSystem might be used for.
> What's the reason to store this as part of the VFS rather than as a separate attribute of the larger reproducer structure?
>From the reproducer's perspective I would argue that it is a property of the VFS. More often than not, the working directory won't exist during replay. That needs to be modeled somewhere, and VFS is the obvious candidate. Indeed, the VFS already deals with the working directories today. You need special handling for this scenario though, because you cannot rely on the underlying (external) FS to do the right thing and might have side effects. At the same time, you might need to change the current working directory, which is fully supported with the current implementation as well. Also note that this functionality is completely optional. If no current working directory is set in the yaml mapping, things behave like they do today.
CHANGES SINCE LAST ACTION
More information about the lldb-commits