[RFC] Debug Operators with GDB Python

Tom Tromey tromey@redhat.com
Fri Nov 30 21:39:00 GMT 2012


>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:

One last thing I forgot -

Siva> +class EnableDebugOperators(gdb.Command):
Siva> +    def __init__(self):
Siva> +        super(EnableDebugOperators, self).__init__("enable debug-operators",
Siva> +                                                   gdb.COMMAND_SUPPORT)
Siva> +
Siva> +    def invoke(self, arg, from_tty):
Siva> +        gdb.operator.enable_debug_operators()

I'm not a fan of this.  I think the feature should be enabled by default
and then individual operators (or groups, not sure) should be
disable-able by the user -- basically the way typedef- and value
pretty-printing work.

Tom



More information about the Gdb-patches mailing list