[all-commits] [llvm/llvm-project] c90ca0: [lldb] Implement WorkingDirectoryProvider in terms...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Aug 20 18:09:16 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c90ca0c8e4956e051e2f29cff0c38f9f03b32f87
      https://github.com/llvm/llvm-project/commit/c90ca0c8e4956e051e2f29cff0c38f9f03b32f87
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M lldb/include/lldb/Utility/Reproducer.h
    M lldb/source/API/SBReproducer.cpp
    M lldb/source/Initialization/SystemInitializerCommon.cpp
    M lldb/source/Utility/Reproducer.cpp

  Log Message:
  -----------
  [lldb] Implement WorkingDirectoryProvider in terms of DirectoryProvider (NFC)

Add an abstract base class that can be used to create other directory
providers.


  Commit: 73af341beb8435c7da1dd5e7a8abacb2de6a236d
      https://github.com/llvm/llvm-project/commit/73af341beb8435c7da1dd5e7a8abacb2de6a236d
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M lldb/include/lldb/Host/FileSystem.h
    M lldb/include/lldb/Utility/Reproducer.h
    M lldb/source/Commands/CommandObjectReproducer.cpp
    M lldb/source/Host/common/FileSystem.cpp
    M lldb/source/Initialization/SystemInitializerCommon.cpp
    M lldb/source/Utility/Reproducer.cpp
    A lldb/test/Shell/Reproducer/Inputs/HomeDir.in
    A lldb/test/Shell/Reproducer/TestHomeDir.test

  Log Message:
  -----------
  [lldb] Capture and load home directory from the reproducer.

When replaying the reproducer, lldb should source the .lldbinit file
that was captured by the reproducer and not the one in the current home
directory. This requires that we store the home directory as part of the
reproducer. By returning the virtual home directory during replay, we
ensure the correct virtual path gets constructed which the VFS can then
find and remap to the correct file in the reproducer root.

This patch adds a new HomeDirectoryProvider, similar to the existing
WorkingDirectoryProvider. As the home directory is not part of the VFS,
it is stored in LLDB's FileSystem instance.


Compare: https://github.com/llvm/llvm-project/compare/66c882e529a3...73af341beb84


More information about the All-commits mailing list