This is an archive of the discontinued LLVM Phabricator instance.

[ScriptInterpreter] Initialize globals when loading a scripting module.
ClosedPublic

Authored by JDevlieghere on Sep 16 2019, 6:09 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Sep 16 2019, 6:09 PM
davide accepted this revision.Sep 16 2019, 6:39 PM

LGTM

This revision is now accepted and ready to land.Sep 16 2019, 6:39 PM
MaskRay added inline comments.
lldb/lit/Commands/Inputs/frame.py
3 ↗(On Diff #220415)

No newline at end of file

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2019, 8:54 PM