From: Graham Labdon <Graham.Labdon@avalonsciences.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Pretty Printing
Date: Fri, 01 Feb 2013 09:22:00 -0000 [thread overview]
Message-ID: <DA78E044FB673F438F102FC52CA4A62C05574F9D@ASLUKEXSVR.avalonsciences.local> (raw)
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 type is detected
Code:
def build_dictionary ():
pretty_printers_dict[re.compile ('^QFile$')] = lambda val:QFilePrinter(val,"false")
pretty_printers_dict[re.compile ('^QFile \*$')] = lambda val: QFilePointerPrinter(val)
Here I have declared handlers for the QFile and QFile * types
In the QFile handler I have this code
Code:
exp = "((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
next reply other threads:[~2013-02-01 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-01 9:22 Graham Labdon [this message]
2013-02-01 17:48 ` Doug Evans
2013-02-01 20:11 ` Pedro Alves
2013-02-04 12:25 ` Joachim Protze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DA78E044FB673F438F102FC52CA4A62C05574F9D@ASLUKEXSVR.avalonsciences.local \
--to=graham.labdon@avalonsciences.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox