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.
15 lines
489 B
Plaintext
15 lines
489 B
Plaintext
# RUN: echo "CHECK: %t.home" > %t.check
|
|
|
|
# RUN: rm -rf %t.repro
|
|
# RUN: rm -rf %t.home
|
|
# RUN: mkdir -p %t.repro
|
|
# RUN: mkdir -p %t.home
|
|
# RUN: echo "print 95000 + 126" > %t.home/.lldbinit
|
|
# RUN: env HOME=%t.home %lldb-init -b -s %S/Inputs/HomeDir.in --capture --capture-path %t.repro | FileCheck %s
|
|
|
|
# RUN: cat %t.repro/home.txt | FileCheck %t.check
|
|
# RUN: %lldb -b -o 'reproducer dump -p home -f %t.repro' | FileCheck %t.check
|
|
|
|
# RUN: %lldb --replay %t.repro | FileCheck %s
|
|
# CHECK: 95126
|