* Python pretty-printer trouble
@ 2013-04-22 12:49 Michael Haupt
2013-04-22 15:30 ` Michael Haupt
0 siblings, 1 reply; 2+ messages in thread
From: Michael Haupt @ 2013-04-22 12:49 UTC (permalink / raw)
To: gdb
Hello,
using gdb 7.5 on Mac OS X, I am registering a pretty-printer written in Python, which won't be triggered. The pretty-printer is supposed to take care of values of type <something>_array.
class MyPP:
def __init__(self, val):
self.val = val
def to_string(self):
return 'This is an array of sorts.'
pp = gdb.printing.RegexpCollectionPrettyPrinter('my_array_pp')
pp.add_printer('arrays', '^.*_array', MyPP)
gdb.printing.register_pretty_printer(None, pp)
The pretty-printer is registered correctly but will not be triggered when values of a type the name of which matches the pattern are to be printed. I've read my way through the available documentation at sourceware.org and still have no clue. By now, I'm sure I'm missing something obvious.
Any hints?
Regards,
Michael Haupt
--
Dr. Michael Haupt
Principal Member of Technical Staff
Phone: +49 331 200 7277, Fax: +49 331 200 7561
Oracle Labs
Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germany
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Python pretty-printer trouble
2013-04-22 12:49 Python pretty-printer trouble Michael Haupt
@ 2013-04-22 15:30 ` Michael Haupt
0 siblings, 0 replies; 2+ messages in thread
From: Michael Haupt @ 2013-04-22 15:30 UTC (permalink / raw)
To: gdb
Hello again,
Am 22.04.2013 um 14:49 schrieb Michael Haupt <michael.haupt@oracle.com>:
> The pretty-printer is registered correctly but will not be triggered when values of a type the name of which matches the pattern are to be printed. I've read my way through the available documentation at sourceware.org and still have no clue. By now, I'm sure I'm missing something obvious.
this issue kind of resolved itself ... simply not generating any smart DWARF expressions that gdb 7.5 does not understand (DW_OP_push_object_address) made the pretty-printer work all of a sudden.
Regards,
Michael Haupt
--
Dr. Michael Haupt
Principal Member of Technical Staff
Phone: +49 331 200 7277, Fax: +49 331 200 7561
Oracle Labs
Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germany
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-22 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-22 12:49 Python pretty-printer trouble Michael Haupt
2013-04-22 15:30 ` Michael Haupt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox