Skip to content

Commit 1ed7fdc

Browse files
committed
rephrase doc
1 parent d6ca5bc commit 1ed7fdc

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lldb/docs/use/variable.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,16 @@ binding mechanism.
369369
Summary Format Matching On Pointers
370370
----------------------
371371

372-
When a summary format is registered for a type ``T``, lldb will apply this
373-
format to both ``T`` and ``T*``. -p options could prevent lldb from using this
374-
format to type ``T*``. When -p options is not given, users can use the -d option
375-
to specify how many layer of pointers can be dereferenced at most when matching
376-
the format of type ``T`` (default to 1). It should be noted that the value
377-
object passed to the summary format won't dereferenced at all.
372+
A summary formatter for a type ``T`` might or might not be appropriate to use
373+
for pointers to that type. If the formatter is only appropriate for the type and
374+
not its pointers, use the ``-p`` option to restrict it to match SBValues of type
375+
``T``. If you want the formatter to also match pointers to the type, you can use
376+
the ``-d`` option to specify how many pointer layers the formatter should match.
377+
The default value is 1, so if you don't specify ``-p`` or ``-d``, your formatter
378+
will be used on SBValues of type ``T`` and ``T*``. If you want to also match
379+
``T**`` set ``-d`` to 2, etc. In all cases, the SBValue passed to the summary
380+
formatter will be the matched ValueObject. lldb doesn't dereference the matched
381+
value down to the SBValue of type ``T`` before passing it to your formatter.
378382

379383
Summary Strings
380384
---------------

0 commit comments

Comments
 (0)