This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] future gdb-gdb.py things in my pipeline...


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel>      I'll try to think of something generic that allows us:
Joel>        - exclude certain fields
Joel>        - print the fields we want in the order we want
Joel>        - add certain artificial fields?
Joel>        - other requirements???

If you change the printer to return a container, this problem is a lot
simpler.  For any field where you just want to see the value as gdb
would ordinarily print it, you simply append the field's value:

    result.append ('fieldname', value['fieldname'])

This is simple enough that, IMO, we don't need any extra machinery:

* To exclude a field, just don't append it.
* To order the fields, append them in the order you want.
* To add an artificial field, just append it with whatever name and
  value you want.

Joel>     * struct type pretty-printer.  Would it make sense to print
Joel>       the type code and name even if this information is in main_type.
Joel>       The amount of output generated is still going to be reasonable,
Joel>       while the extra data could be potentially very useful.

Yes please, usually when I print a struct type I want to see the name.

Joel>     * We need pretty-printers for other GDB types as well. For instance,
Joel>       a pretty-printer for struct value would be nice... 

Yeah, that would be handy.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]