[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 6 14:35:28 PST 2024


================
@@ -0,0 +1,315 @@
+"""
+This module implements a couple of utility classes to make writing
+lldb parsed commands more Pythonic.
+The way to use it is to make a class for you command that inherits from ParsedCommandBase.
----------------
jimingham wrote:

I converted the lldb/examples/python/cmdtemplate.py to the new form in the latest patch, if you want to get a sense of what you have to do to convert from one form to the other.  I think this is pretty straightforward.  But it also can't be a straight translation because you need to be able to specify the lldb.eArgType... .  Anyway, have a look at the diff between the two, and if you can think of anything to make this easier, I'm happy for suggestions (maybe as a follow-on patch, if this looks roughly okay, however...)

https://github.com/llvm/llvm-project/pull/70734


More information about the lldb-commits mailing list