[Lldb-commits] [lldb] 1287977 - Document third option to python synthetic type summary
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 13 13:06:11 PST 2020
Author: Jason Molenda
Date: 2020-02-13T13:04:51-08:00
New Revision: 1287977b9edd86a4983542b50a082dd0996ae67e
URL: https://github.com/llvm/llvm-project/commit/1287977b9edd86a4983542b50a082dd0996ae67e
DIFF: https://github.com/llvm/llvm-project/commit/1287977b9edd86a4983542b50a082dd0996ae67e.diff
LOG: Document third option to python synthetic type summary
callback unconditionally; it was added to lldb five years
ago and we don't need to qualify its availability.
Added:
Modified:
lldb/docs/use/variable.rst
Removed:
################################################################################
diff --git a/lldb/docs/use/variable.rst b/lldb/docs/use/variable.rst
index 4e3f25eb6a4a..7915abf92d65 100644
--- a/lldb/docs/use/variable.rst
+++ b/lldb/docs/use/variable.rst
@@ -651,7 +651,7 @@ class, as shown in this example:
(lldb) type summary add -P Rectangle
Enter your Python command(s). Type 'DONE' to end.
- def function (valobj,internal_dict):
+ def function (valobj,internal_dict,options):
height_val = valobj.GetChildMemberWithName('height')
width_val = valobj.GetChildMemberWithName('width')
height = height_val.GetValueAsUnsigned(0)
@@ -698,6 +698,12 @@ that (yet) via this method call, and you must use ``GetChildAtIndex()``
querying it for the array items one by one. Also, handling custom formats is
something you have to deal with on your own.
+``options`` Python summary formatters can optionally define this
+third argument, which is an object of type ``lldb.SBTypeSummaryOptions``,
+allowing for a few customizations of the result. The decision to
+adopt or not this third argument - and the meaning of options thereof
+- is up to the individual formatter's writer.
+
Other than interactively typing a Python script there are two other ways for
you to input a Python script as a summary:
@@ -716,14 +722,6 @@ you to input a Python script as a summary:
LLDB will emit a warning if it is unable to find the function you passed, but
will still register the binding.
-Starting in SVN r222593, Python summary formatters can optionally define a
-third argument: options
-
-This is an object of type ``lldb.SBTypeSummaryOptions`` that can be passed into
-the formatter, allowing for a few customizations of the result. The decision to
-adopt or not this third argument - and the meaning of options thereof - is
-within the individual formatters' writer.
-
Regular Expression Typenames
----------------------------
More information about the lldb-commits
mailing list