You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Xcode invoked lldb gets upset if SBDebugger.HandleCommand() invoked commands set Python variables, but not (apparently) until the temporary global created in order to run the HandleCommand() commands is destroyed. Specifically it throws a KeyError complaining that those variables are not present after all the commands run under HandleCommand have completed.
This is an upstreaming of the following report in Mozilla's Bugzilla:
I should also note that when lldb is invoked directly from a terminal (i.e. not invoked by Xcode linking to liblldb to invoke the driver) and this breakpoint is set and runs, this problem does not occur.
$ echo "script foo = 1" > test.lldb
$ lldb ./a.out
(lldb) b main
(lldb) breakpoint command add -s python
Enter your Python command(s). Type 'DONE' to end.
def function (frame, bp_loc, internal_dict):
"""frame: the lldb.SBFrame for the location at which you stopped
bp_loc: an lldb.SBBreakpointLocation for the breakpoint location information
internal_dict: an LLDB support object not to be used"""
target = frame.GetThread().GetProcess().GetTarget()
debugger = target.GetDebugger()
debugger.HandleCommand("command source -s true ./test.lldb")
DONE
(lldb) run
Traceback (most recent call last):
File "temp.py", line 11, in lldb_autogen_python_bp_callback_func__0
KeyError: 'foo'
Although unrelated, the repro is also hitting an assert in the editline implementation: lldbassert(m_editor_status != EditorStatus::Editing) in Editline::GetLine().
Extended Description
Xcode invoked lldb gets upset if SBDebugger.HandleCommand() invoked commands set Python variables, but not (apparently) until the temporary global created in order to run the HandleCommand() commands is destroyed. Specifically it throws a KeyError complaining that those variables are not present after all the commands run under HandleCommand have completed.
This is an upstreaming of the following report in Mozilla's Bugzilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=1605268
The text was updated successfully, but these errors were encountered: