[Lldb-commits] [PATCH] D60968: WIP, RFC: Add an example of how LLDB python plug-in could look like

Alexander Polyakov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 22 09:48:44 PDT 2019


apolyakov created this revision.
apolyakov added reviewers: jingham, aprantl, labath.
Herald added a project: LLDB.

This commit shows how LLDB python plug-in could look like.

Such an approach allows users to use LLDB for OS kernel debugging, for doing that they only need to implement two interfaces: `OperatingSystemInterface` and `OSThread`.  As an example, this patch contains `zephyr.py` file with simple plug-in implementation for Zephyr OS, OS-specific files could live in OS' repository and evolve alongside it.

In the future, arch-specific code, e.g. `arc.py`, can be eliminated since LLDB already implements that functionality.

Remaining code can be upstreamed to LLDB with or without significant changes, the main idea of the review is to discuss these changes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D60968

Files:
  lldb/examples/python/lldb-os-plugin/arch/__init__.py
  lldb/examples/python/lldb-os-plugin/arch/arc.py
  lldb/examples/python/lldb-os-plugin/arch/common.py
  lldb/examples/python/lldb-os-plugin/core/__init__.py
  lldb/examples/python/lldb-os-plugin/core/cvalue.py
  lldb/examples/python/lldb-os-plugin/core/operating_system.py
  lldb/examples/python/lldb-os-plugin/core/osplugin_common.py
  lldb/examples/python/lldb-os-plugin/core/register_set_common.py
  lldb/examples/python/lldb-os-plugin/core/thread.py
  lldb/examples/python/lldb-os-plugin/logging.yaml
  lldb/examples/python/lldb-os-plugin/logs/.gitkeep
  lldb/examples/python/lldb-os-plugin/utilities/helpers.py
  lldb/examples/python/lldb-os-plugin/utilities/tracing.py
  lldb/examples/python/lldb-os-plugin/zephyr.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60968.196081.patch
Type: text/x-patch
Size: 37177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190422/879a42f5/attachment-0001.bin>


More information about the lldb-commits mailing list