From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30799 invoked by alias); 1 Feb 2013 09:22:25 -0000 Received: (qmail 30787 invoked by uid 22791); 1 Feb 2013 09:22:24 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from a.painless.aa.net.uk (HELO a.painless.aa.net.uk) (81.187.30.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Feb 2013 09:22:20 +0000 Received: from 51.211.187.81.in-addr.arpa ([81.187.211.51] helo=mail.avalonsciences.com) by a.painless.aa.net.uk with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1U1CpS-0004Aw-QG for gdb@sourceware.org; Fri, 01 Feb 2013 09:22:38 +0000 Received: from ASLUKEXSVR.avalonsciences.local ([fe80::75ae:1a99:3729:99d]) by ASLUKEXSVR.avalonsciences.local ([fe80::75ae:1a99:3729:99d%10]) with mapi id 14.01.0421.002; Fri, 1 Feb 2013 09:22:17 +0000 From: Graham Labdon To: "gdb@sourceware.org" Subject: Pretty Printing Date: Fri, 01 Feb 2013 09:22:00 -0000 Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2013-02/txt/msg00003.txt.bz2 Hi I don't know if there is anyone on this forum who can help I am developing a set of gdb pretty printers for Qt A dictionary is built of the functions to call when a variable of a given t= ype is detected Code: def build_dictionary (): pretty_printers_dict[re.compile ('^QFile$')] =3D lambda val:QFilePrinte= r(val,"false") pretty_printers_dict[re.compile ('^QFile \*$')] =3D lambda val: QFilePo= interPrinter(val) Here I have declared handlers for the QFile and QFile * types In the QFile handler I have this code Code: exp =3D "((class QFile *)%s)->%s()" % (value.address, "exists") The problem is that this causes the handler for QFile * to be called which = causes great problems If any Python guru knows how to overcome this I would appreciate it Thanks