Re: [PATCHv2 5/5] gdb: Introduce 'print max-depth' feature

Andrew Burgess
2019-04-18T01:07:32Z

* Eli Zaretskii <eliz@gnu.org> [2019-04-17 17:35:27 +0300]:

> > From: Andrew Burgess <andrew.burgess@embecosm.com>
> > Cc: Andrew Burgess <andrew.burgess@embecosm.com>
> > Date: Wed, 17 Apr 2019 00:06:10 +0100
> >
> > Introduce a new print setting max-depth which can be set with 'set
> > print max-depth DEPTH'. The default value of DEPTH is 20, but this
> > can also be set to unlimited.
>
> OK for the documentation parts, with one minor comment:
>
> > +To see the contents of structures that have been hidden the user can
> > +either increase the print max-depth to increase, or they can print
>
> "increase ... to increase" sounds awkward and perhaps even confusing.
> Can we come up with a better wording?

You're right, that doesn't read well, how about simply dropping the
'...to increase' like this:

+To see the contents of structures that have been hidden the user
+can either increase the print max-depth, or they can print the
+elements of the structure that are visible, for example
+
+@smallexample
+(gdb) p var
+$1 = @{d = @{c = @{...@}@}@}
+(gdb) p var.d
+$2 = @{c = @{b = @{...@}@}@}
+(gdb) p var.d.c
+$3 = @{b = @{a = 3@}@}
+@end smallexample
+

Thanks,
Andrew

>
> Thanks.