iBoot/tools/lldb_init_iboot.py

11 lines
773 B
Python
Raw Normal View History

2023-07-08 13:03:17 -07:00
def __lldb_init_module(debugger, internal_dict):
print "Loading iBoot debugging from %s" % __file__
self_path = str(__file__)
base_dir_name = self_path[:self_path.rfind("/")]
core_os_plugin = base_dir_name + "/lldb_os_iboot.py"
osplugin_cmd = "settings set target.process.python-os-plugin-path \"%s\"" % core_os_plugin
print osplugin_cmd
debugger.HandleCommand(osplugin_cmd)
thread_fmt_cmd = 'settings set thread-format thread #${thread.index}{ "${thread.name}"}: tid = ${thread.id}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-args}${function.pc-offset}}}{ at ${line.file.basename}:${line.number}}{, stop reason = ${thread.stop-reason}}{\nReturn value: ${thread.return-value}}\n'
debugger.HandleCommand(thread_fmt_cmd)