From a879f40ba105ab5ceb79725424c77c1fd68a58a1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 17 Sep 2019 03:55:58 +0000 Subject: [ScriptInterpreter] Initialize globals when loading a scripting module. The LoadScriptingModule used by command script import wasn't initializing the LLDB global variables (things like `lldb.frame` and `lldb.debugger`). They would get initialized however when running the interactive script interpreter or running a single script line (e.g. `script print(lldb.frame)`). This patch fixes that by properly initializing the globals when loading a Python module. Differential revision: https://reviews.llvm.org/D67644 llvm-svn: 372060 --- lldb/lit/Commands/Inputs/frame.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lldb/lit/Commands/Inputs/frame.py (limited to 'lldb/lit/Commands/Inputs/frame.py') diff --git a/lldb/lit/Commands/Inputs/frame.py b/lldb/lit/Commands/Inputs/frame.py new file mode 100644 index 00000000000..cd7b61c976e --- /dev/null +++ b/lldb/lit/Commands/Inputs/frame.py @@ -0,0 +1,2 @@ +import lldb +print(lldb.frame) -- cgit v1.2.3