blob: 0ee57c14130aeda0e799e419de6295ae5ebd55ac [file] [edit]
# REQUIRES: python, asserts, !system-windows
# Test that LLDB auto-loads <safe-path>/<module-name>/<module-name>.py on
# module load.
# RUN: split-file %s %t
# RUN: %clang_host %t/main.c -o %t/TestModule.out
# RUN: mkdir -p %t/safe-path/TestModule
# RUN: cp %t/script.py %t/safe-path/TestModule/TestModule.py
# RUN: %lldb -b \
# RUN: -o 'settings set target.load-script-from-symbol-file true' \
# RUN: -o 'settings append testing.safe-auto-load-paths %t/safe-path' \
# RUN: -o 'target create %t/TestModule.out' 2>&1 | FileCheck %s
# CHECK: AUTOLOAD_SUCCESS
#--- main.c
int main() { return 0; }
#--- script.py
import sys
def __lldb_init_module(debugger, internal_dict):
print("AUTOLOAD_SUCCESS", file=sys.stderr)