From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20169 invoked by alias); 22 Apr 2013 12:49:28 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 20157 invoked by uid 89); 22 Apr 2013 12:49:28 -0000 X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_05,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 22 Apr 2013 12:49:27 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r3MCnPw4032344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 22 Apr 2013 12:49:26 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3MCnONL008504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 22 Apr 2013 12:49:25 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3MCnOI9008499 for ; Mon, 22 Apr 2013 12:49:24 GMT Received: from dhcp-potsdam-10-165-122-246.de.oracle.com (/10.165.122.246) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Apr 2013 05:49:24 -0700 From: Michael Haupt Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Python pretty-printer trouble Message-Id: <02C07AA4-ED67-4725-94A9-CAD82D624420@oracle.com> Date: Mon, 22 Apr 2013 12:49:00 -0000 To: "gdb@sourceware.org" Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) X-SW-Source: 2013-04/txt/msg00059.txt.bz2 Hello, using gdb 7.5 on Mac OS X, I am registering a pretty-printer written in Pyt= hon, which won't be triggered. The pretty-printer is supposed to take care = of values of type _array. class MyPP: def __init__(self, val): self.val =3D val def to_string(self): return 'This is an array of sorts.' pp =3D 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 v= alues 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 st= ill have no clue. By now, I'm sure I'm missing something obvious. Any hints? Regards, Michael Haupt --=20 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, Germa= ny