Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joachim Protze <joachim.protze@tu-dresden.de>
To: somersetgraham <graham.labdon@avalonsciences.com>
Cc: gdb@sourceware.org
Subject: Re: help with pretty printing
Date: Thu, 07 Jun 2012 07:42:00 -0000	[thread overview]
Message-ID: <4FD05B70.7040008@tu-dresden.de> (raw)
In-Reply-To: <33943560.post@talk.nabble.com>

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On 01.06.2012 11:07, somersetgraham wrote:
> def build_dictionary ():
>     pretty_printers_dict[re.compile ('^QFile$')] = lambda
> val:QFilePrinter(val)
>     pretty_printers_dict[re.compile ('^QFile *$')] = lambda
> val:QFilePrinter(val)
you may try something like the following to match both cases:

pretty_printers_dict[re.compile('^QFile ( \*)?$')] = lambda
val:QFilePrinter(val)


The asterisk is a special character in regular expressions and has to be escaped to match an asterisk. Your regexp matches QFile with any count of spaces as postfix.

- Joachim



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5306 bytes --]

  parent reply	other threads:[~2012-06-07  7:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01  9:07 somersetgraham
2012-06-02  5:28 ` Niko Sams
2012-06-02 10:29 ` xgsa
2012-06-02 11:10   ` Niko Sams
2012-06-02 11:24     ` xgsa
2012-06-07  7:42 ` Joachim Protze [this message]
2012-06-07 18:27   ` Paul_Koning
2012-06-25 11:05     ` 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=4FD05B70.7040008@tu-dresden.de \
    --to=joachim.protze@tu-dresden.de \
    --cc=gdb@sourceware.org \
    --cc=graham.labdon@avalonsciences.com \
    /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