mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-26 02:33:31 +08:00
Document lazy computation for pretty-printer "children" method
I found out recently that some users didn't know that the Python pretty-printers "children" method should compute its result lazily. This has been a good idea since the earliest days, but wasn't mentioned in the docs. This patch adds some text to this effect. gdb/doc/ChangeLog 2019-05-10 Tom Tromey <tromey@adacore.com> * python.texi (Pretty Printing API): Mention lazy computation for "children".
This commit is contained in:
parent
71bed2dba6
commit
a97c8e5636
@ -1,3 +1,8 @@
|
||||
2019-05-10 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* python.texi (Pretty Printing API): Mention lazy computation for
|
||||
"children".
|
||||
|
||||
2019-05-10 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* gdb.texinfo (Set Catchpoints): Add text for parameter to "catch
|
||||
|
@ -1371,6 +1371,12 @@ object which is convertible to a @value{GDBN} value.
|
||||
This method is optional. If it does not exist, @value{GDBN} will act
|
||||
as though the value has no children.
|
||||
|
||||
For efficiency, the @code{children} method should lazily compute its
|
||||
results. This will let @value{GDBN} read as few elements as
|
||||
necessary, for example when various print settings (@pxref{Print
|
||||
Settings}) or @code{-var-list-children} (@pxref{GDB/MI Variable
|
||||
Objects}) limit the number of elements to be displayed.
|
||||
|
||||
Children may be hidden from display based on the value of @samp{set
|
||||
print max-depth} (@pxref{Print Settings}).
|
||||
@end defun
|
||||
|
Loading…
Reference in New Issue
Block a user