[Lldb-commits] [PATCH] D109101: [lldb] Add an option to specify a VFS overlay

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 1 15:44:27 PDT 2021


JDevlieghere created this revision.
JDevlieghere added reviewers: jingham, clayborg, teemperor, labath.
Herald added a subscriber: dang.
JDevlieghere requested review of this revision.

Add the ability to specify a VFS overlay to the command line driver. The motivation for this functionality is to facilitate testing. Jim has a patch where we want to simulate a remote debugging situation where a binary doesn't exist for locally (i.e. for LLDB) but does exist remotely (i.e. for debugserver).

LLDB already uses a virtual file system for the reproducers. This patch is mainly focussed on being able to initialize the FileSystem with a VFS specified on the command line.

One limitation here is that, unlike clang, you can only specify a single VFS overlay. This is caused by the FileSystem having to devitualize the path, which requires it to know whether the VFS is a RedirectingFileSystem. We wouldn't have this issue if LLDB were to only manipulate files through LLVM's memory buffer abstraction, but when the same issue came up for the reproducers, that was deemed too intrusive. As this functionality is really meant for development and testing, I'm not too concerned about that.


https://reviews.llvm.org/D109101

Files:
  lldb/include/lldb/API/SBDebugger.h
  lldb/include/lldb/API/SBDefines.h
  lldb/include/lldb/Initialization/SystemInitializerCommon.h
  lldb/source/API/SBDebugger.cpp
  lldb/source/API/SystemInitializerFull.cpp
  lldb/source/API/SystemInitializerFull.h
  lldb/source/Initialization/SystemInitializerCommon.cpp
  lldb/test/Shell/Driver/Inputs/create_overlay.py
  lldb/test/Shell/Driver/TestOverlay.test
  lldb/tools/driver/Driver.cpp
  lldb/tools/driver/Options.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109101.370088.patch
Type: text/x-patch
Size: 11080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210901/c6c021d7/attachment.bin>


More information about the lldb-commits mailing list