| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb/crashlog] Add CrashLogScriptedProcess & remove interactive mode This patch introduces a new type of ScriptedProcess: CrashLogScriptedProcess. It takes advantage of lldb's crashlog parsers and Scripted Processes to reconstruct a static debugging session with symbolicated stackframes, instead of just dumping out everything in the user's terminal. The crashlog command also has an interactive mode that only provide a very limited experience. This is why this patch removes all the logic for this interactive mode and creates CrashLogScriptedProcess instead. This will fetch and load all the libraries that were used by the crashed thread and re-create all the frames artificially. rdar://88721117 Differential Revision: https://reviews.llvm.org/D119501 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> | 4 年前 | |
[lldb] Call __lldb_init_module from __init__ Update __init__.py generation to implement __lldb_init_module, which calls __lldb_init_module on submodules that define it. This allows the use case where a user runs command script import lldb.macosx. With this change, the __lldb_init_module function in crashlog.py and heap.py will be run, which is where command registration is occurring. Differential Revision: https://reviews.llvm.org/D119179 | 4 年前 | |
[lldb] add fallback for LLDB_PYTHON_RELATIVE_PATH Some pythons are configured to set platlib somewhere outside of their sys.prefix. It's important that we at least use some reasonable default for LLDB_PYTHON_RELATIVE_PATH even in that case, because even if the user overrides it on the cmake invocation, cmake will still be called without the override in order to build tablegen. Reviewed By: JDevlieghere, clayborg Differential Revision: https://reviews.llvm.org/D114973 | 4 年前 | |
[lldb] make it easier to find LLDB's python It is surprisingly difficult to write a simple python script that can reliably import lldb without failing, or crashing. I'm currently resorting to convolutions like this: def find_lldb(may_reexec=False): if prefix := os.environ.get('LLDB_PYTHON_PREFIX'): if os.path.realpath(prefix) != os.path.realpath(sys.prefix): raise Exception("cannot import lldb.\n" f" sys.prefix should be: {prefix}\n" f" but it is: {sys.prefix}") else: line1, line2 = subprocess.run( ['lldb', '-x', '-b', '-o', 'script print(sys.prefix)'], encoding='utf8', stdout=subprocess.PIPE, check=True).stdout.strip().splitlines() assert line1.strip() == '(lldb) script print(sys.prefix)' prefix = line2.strip() os.environ['LLDB_PYTHON_PREFIX'] = prefix if sys.prefix != prefix: if not may_reexec: raise Exception( "cannot import lldb.\n" + f" This python, at {sys.prefix}\n" f" does not math LLDB's python at {prefix}") os.environ['LLDB_PYTHON_PREFIX'] = prefix python_exe = os.path.join(prefix, 'bin', 'python3') os.execl(python_exe, python_exe, *sys.argv) lldb_path = subprocess.run(['lldb', '-P'], check=True, stdout=subprocess.PIPE, encoding='utf8').stdout.strip() sys.path = [lldb_path] + sys.path This patch aims to replace all that with: #!/usr/bin/env lldb-python import lldb ... ... by adding the following features: * new command line option: --print-script-interpreter-info. This prints language-specific information about the script interpreter in JSON format. * new tool (unix only): lldb-python which finds python and exec's it. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D112973 | 4 年前 | |
[lldb] Add missing UTF-8 char basic type entries D120690 introduced eBasicTypeChar8 but missed proper documentation order. This also introduces the missing bindings data on Swig, which should correspond with the documented information. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D116136 | 3 年前 | |
[lldb/python] Fix dangling Event and CommandReturnObject references Unlike the rest of our SB objects, SBEvent and SBCommandReturnObject have the ability to hold non-owning pointers to their non-SB counterparts. This makes it hard to ensure the SB objects do not become dangling once their backing object goes away. While we could make these two objects behave like others, that would require plubming even more shared pointers through our internal code (Event objects are mostly prepared for it, CommandReturnObject are not). Doing so seems unnecessarily disruptive, given that (unlike for some of the other objects) I don't see any good reason why would someone want to hold onto these objects after the function terminates. For that reason, this patch implements a different approach -- the SB objects will still hold non-owning pointers, but they will be reset to the empty/default state as soon as the function terminates. This python code will not crash if the user decides to store these objects -- but the objects themselves will be useless/empty. Differential Revision: https://reviews.llvm.org/D116162 | 4 年前 | |
Move Py_buffer_RAII to .h file so SWIG 2 doesnt have to parse it struct Py_buffer_RAII definition uses explicit deleted functions which are not supported by SWIG 2 (only 3). To get around this I moved this struct to an .h file that is included to avoid being parsed by swig. Reviewed By: lawrence_danna Differential Revision: https://reviews.llvm.org/D86381 | 5 年前 | |
feat: 930 opensource Signed-off-by: wzy_00889928 <1322947566@qq.com> | 8 个月前 | |
[lldb/python] Use PythonObject in LLDBSwigPython functions Return our PythonObject wrappers instead of raw PyObjects (obfuscated as void *). This ensures that ownership (reference counts) of python objects is automatically tracked. Differential Revision: https://reviews.llvm.org/D117462 | 4 年前 | |
[lldb] Remove lldbconfig module The lldbconfig module was necessary to run the LLDB test suite against a reproducer. Since this functionality has been removed, the module is no longer necessary. | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 8 个月前 | ||
| 4 年前 | ||
| 4 年前 |