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: [RFA, doc RFA]: New printing module and info/disable/enable commands


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> +When @value{GDBN} prints a value, it first sees if there is a pretty-printer
Doug> +registered for the value's type.

Actually, a printer can recognize a value based on whatever it likes,
not just the value's type.

Doug> +import gdb.command.pretty_printers
Doug> +
Doug> +gdb.command.pretty_printers.register_pretty_printer_commands()

I think we should have command modules auto-register the commands on
import.  That way we can make __init__.py import all the command modules
it finds and not worry about what functions to call to initialize.

I don't think you need to change anything here, unless you really want.
Phil is working on a patch in this area right now.


Thanks for doing this.  It looks good to me.

I will try to remember to update the libstdc++ printers to
(conditionally) use the new machinery when I get back.  I think this
will let us finally give users the ability to separately disable the
iterator printers, which some folks have asked for.

Tom


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