Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Registering pretty-printers
Date: Fri, 12 Jun 2009 17:43:00 -0000	[thread overview]
Message-ID: <200906122143.49143.vladimir@codesourcery.com> (raw)
In-Reply-To: <m3hbyl9wwh.fsf@fleche.redhat.com>

On Friday 12 June 2009 Tom Tromey wrote:

> I would like to solve the remaining problems.  I just don't know how
> to do it, in a way that preserves the qualities I care about.  What I
> care about is, more or less, embedded in what I implemented: make it
> super easy for printers to be developed alongside applications and
> libraries, and be made available automatically without user
> intervention.

Probably the cases I have described are too tricky to allow for automatic
setup of pretty-printers. E.g. header-only-library case is pretty much
impossible to handle.

> Vladimir> Therefore, we should make up some conventions how a
> Vladimir> pretty-printer can be packaged separately, preferably as a
> Vladimir> single file, and how IDE, given name of the file and nothing
> Vladimir> else, can enable pretty printing.
> 
> That would be fine by me.
> 
> Vladimir> Say, how about tar.gz, which is unpacked by IDE, whose top-level
> Vladimir> directory is added to PYTHONPATH, and which should have top-level
> Vladimir> file called init.py, with a function 'init_pretty_printers'?
> 
> I don't see how it is better than the hook file approach we already
> have.  Your IDE could easily send "python execfile" to load any given
> hook file.  Defining a function in that file doesn't add anything that
> I can see.

There are two important points I propose:

1. Having a file at top-level, as opposed in some subdir which name
differs.
2. Having a file with fixed name. 

I am probably wrong, but neither of this is true with the current
recommended approach.

> It seems to me that you could make a .tar holding all the files from
> libstdc++/python, then have your IDE unpack these somewhere, update
> sys.path, and execfile the file(s) in the topmost directory.  Assuming
> these files follow the "None convention", it will work fine.

I did not notice any files on top-level. Have I missed something?

- Volodya


  reply	other threads:[~2009-06-12 17:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 23:11 Vladimir Prus
2009-06-10 19:25 ` Tom Tromey
2009-06-11  8:29   ` Vladimir Prus
2009-06-11 17:14     ` Paul Pluzhnikov
2009-06-12  0:52       ` Daniel Jacobowitz
2009-06-12  7:20         ` Vladimir Prus
2009-06-12 16:43         ` Doug Evans
2009-06-12 16:51           ` Daniel Jacobowitz
2009-06-12 17:12             ` Doug Evans
2009-06-12 17:06         ` Tom Tromey
2009-06-12 17:36     ` Tom Tromey
2009-06-12 17:43       ` Vladimir Prus [this message]
2009-06-15 20:23         ` Tom Tromey
2009-06-26 20:37           ` Tom Tromey
2009-06-27 10:16             ` Vladimir Prus

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=200906122143.49143.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=gdb@sources.redhat.com \
    --cc=tromey@redhat.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