Variable: gud--lldb-python-init-string

gud--lldb-python-init-string is a variable defined in gud.el.gz.

Value

"deb = lldb.debugger\ninst = deb.GetInstanceName()\nff = deb.GetInternalVariableValue('frame-format', inst).GetStringAtIndex(0)\nff = ff[:-1] + '!gud ${line.number}:{${line.column}}:${line.file.fullpath}\\\\n\"'\n_ = deb.SetInternalVariable('frame-format', ff, inst)\ndef gud_complete(s, max):\n    interpreter = lldb.debugger.GetCommandInterpreter()\n    string_list = lldb.SBStringList()\n    interpreter.HandleCompletion(s, len(s), len(s), max, string_list)\n    print('gud-completions: ##(')\n    # Specifying a max count doesn't seem to work in LLDB 17.\n    max = min(max, string_list.GetSize())\n    for i in range(max):\n        print(f'\"{string_list.GetStringAtIndex(i)}\" ')\n    print(')##')\n"

Documentation

Python code sent to LLDB for gud-specific initialization.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
(defconst gud--lldb-python-init-string
  "\
deb = lldb.debugger
inst = deb.GetInstanceName()
ff = deb.GetInternalVariableValue('frame-format', inst).GetStringAtIndex(0)
ff = ff[:-1] + '!gud ${line.number}:{${line.column}}:${line.file.fullpath}\\\\n\"'
_ = deb.SetInternalVariable('frame-format', ff, inst)
def gud_complete(s, max):
    interpreter = lldb.debugger.GetCommandInterpreter()
    string_list = lldb.SBStringList()
    interpreter.HandleCompletion(s, len(s), len(s), max, string_list)
    print('gud-completions: ##(')
    # Specifying a max count doesn't seem to work in LLDB 17.
    max = min(max, string_list.GetSize())
    for i in range(max):
        print(f'\"{string_list.GetStringAtIndex(i)}\" ')
    print(')##')
"
  "Python code sent to LLDB for gud-specific initialization.")