cprint: add modifier for hierarchical display
The vsix comes with the hierarchical display of a variable and that's quite a nice feature.
To show all the variables in a structure we can currently do cprint *group*
to get all of the variables, but this has the following issues:
- needs a lot of space because the variable name are all printed "fully"
- prints partially not useful content because it prints the groups itself, too
- is likely to match other full names
I suggest a modifier "/+" that prints hierarchical, so instead of the current
(gdb) cp *grp*
1 : EXTGRP : ' ' <repeats 500 times>
2 : GRP/PROG-DATA/PROG-PARM : ' ' <repeats 21 times>[...]
3 : GRP-INF/GRP/PROG-DATA/PROG-PARM : " "
4 : GRP-SA/GRP-INF/GRP/PROG-DATA/PROG-PARM : " "
5 : GRP-KEY/GRP/PROG-DATA/PROG-PARM : ' ' <repeats [...]
6 : GRP-STEUSCHL/GRP-KEY/GRP/PROG-DATA/PROG-PARM : [...]
7 : GRP-RNG/GRP-KEY/GRP/PROG-DATA/PROG-PARM : " "
8 : GRP-RNGB/GRP-KEY/GRP/PROG-DATA/PROG-PARM : " "
9 : GRP-SNR/GRP-KEY/GRP/PROG-DATA/PROG-PARM : 0000000
10 : GRP-PRIO/GRP-KEY/GRP/PROG-DATA/PROG-PARM : 000
11 : GRP-REC/GRP/PROG-DATA/PROG-PARM : " ", '^' <repeats [...]
12 : GRP-WHG/GRP-REC/GRP/PROG-DATA/PROG-PARM : " "
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
We would have the following:
(gdb) cp /+ grp
GRP/PROG-DATA/PROG-PARM
GRP-INF
GRP-SA : " "
GRP-KEY
GRP-STEUSCHL : [...]
GRP-RNG : " "
GRP-RNGB : " "
GRP-SNR : 0000000
GRP-PRIO : 000
GRP-REC
GRP-WHG : " "
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
Edited by Simon Sobisch