Problem redefining python pretty printers
Phil Muldoon
pmuldoon@redhat.com
Mon May 23 15:24:00 GMT 2011
Doug Evans <dje@google.com> writes:
> On Sat, May 21, 2011 at 6:41 PM, Robert Lupton the Good
> <rhl@astro.princeton.edu> wrote:
>> The routine register is:
>>> def register():
>>> printer = gdb.printing.RegexpCollectionPrettyPrinter("afw")
>>> gdb.printing.register_pretty_printer(gdb, printer)
>>
>> Any advice on what I'm doing wrong? I suppose I could come up with a new name each time, but that seems a little clumsy.
>
> You're not doing anything wrong, per se.
> I think we need to handle this use-case though.
> gdb could either provide a way to replace an existing pretty-printer
> or delete it so that it can be re-added.
I guess you could delete it from the (gdb) list directly by using the
Python list functions. But that is hacky. I agree on the specific
API. I can't remember seeing a bug for this. Is there one?
Cheers,
Phil
More information about the Gdb
mailing list