How to implement an abbreviated view of a class type

Mary Ma via Gdb
2023-05-24T18:07:49Z

Dear all,

I am currently working on implementing pretty printing views for some class types in both GUI-based GDB, such as VS Code, and GDB command line interface. These types contain nested classes and multiple levels of inheritance.

However, the challenge I'm facing is that the command line interface displays all the information of a class type at once including inheritance, properties, subclasses. This makes the output overwhelming for developers, especially when encountering cyclic structures.

For instance, it's possible that Type A points to Type B and vice versa, creating a cyclic relationship that makes the view look messy.

I am wondering if there are ways to present an abbreviated view of a type and allow developers to have further control over the amount of detail in the output, depending on what developers want to see.

I would greatly appreciate any suggestions or ideas from you. Thank you in advance!

Best regards,
Mary