Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Doug Evans <dje@google.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][PR python/17364] Cleanup registration of __gdb_builtin_type_bound128 pretty-printer
Date: Tue, 07 Oct 2014 12:17:00 -0000	[thread overview]
Message-ID: <5433D9C6.5030202@redhat.com> (raw)
In-Reply-To: <yjt21tqn7jvk.fsf@ruffy.mtv.corp.google.com>

On 04/10/14 19:46, Doug Evans wrote:
> Hi.
>
> The registration of this pretty-printer is all wrong.
> This patch creates a new global "builtin" collection of pretty-printers,
> adds the bound pretty-printer to it, and provides an API call
> to let one register more builtin pretty-printers.
>
> I'd really like to get this into 7.8.1,
> I don't want the way it is currently registered to get built on.
>
> One thing that still bothers me is that the bound128 type is
> x86-specific and yet the printer is arch-independent.
> That should require changing the name __gdb_builtin_type_bound128
> in i386-tdep.c to include x86 in the name (or some such),
> but maybe that's too big a change for now.
> But as gdb becomes more multi-arch, attention to collisions and confusion
> in global namespaces (e.g., the space of builtin pretty-printers)
> is going to be more important.
> [One way to solve this would be to record such printers with
> the arch, but that feels like overkill.]
>
> 2014-10-03  Doug Evans  <xdje42@gmail.com>
>
>     PR python/17364
>     * python/lib/gdb/__init__.py (packages): Add "printer".
>     * python/lib/gdb/command/bound_registers.py: Moved to ...
>     * python/lib/gdb/printer/bound_registers.py: ... here.
>     Add printer to global set of builtin printers.  Rename printer from
>     "bound" to "bound128".
>     * python/lib/gdb/printing.py (_builtin_pretty_printers): New global,
>     registered as global "builtin" printer.
>     (add_builtin_pretty_printer): New function.
>     * data-directory/Makefile.in (PYTHON_FILE_LIST): Update, and add
>     gdb/printer/__init__.py.

Doug,

Looks fine to me.  I kind of like the idea of a more specific
"printer" based package for commands or functions that only
specifically relate to printers.

Cheers

Phil


      parent reply	other threads:[~2014-10-07 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-04 18:47 Doug Evans
2014-10-06  7:34 ` Tedeschi, Walfred
2014-10-09 16:23   ` Doug Evans
2014-10-13  6:57     ` Tedeschi, Walfred
2014-10-13 18:09       ` Doug Evans
2014-10-07 12:17 ` Phil Muldoon [this message]

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=5433D9C6.5030202@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@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