Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Joel Borggrén-Franck" <joel.borggren.franck@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Extending gdb.Value
Date: Wed, 29 Sep 2010 21:23:00 -0000	[thread overview]
Message-ID: <m37hi4i6ru.fsf@fleche.redhat.com> (raw)
In-Reply-To: <AANLkTinLE4MRH051h5LMjJbkrYe5scj+P7VxxCr=WYgh@mail.gmail.com>	("Joel =?utf-8?Q?Borggr=C3=A9n-Franck=22's?= message of "Wed, 29 Sep 2010 17:18:10	+0200")

>>>>> "Joel" == Joel Borggrén-Franck <joel.borggren.franck@gmail.com> writes:

Joel> So I noticed today that I cant extend gdb.Value:

Joel> The fix for this is trivial:
[...]

Joel> I'm convinced this is a good idea. I got lots of stuff I would like to
Joel> add on top of gdb.Value that only makes sense in the context of
Joel> specific applications.

Joel> So how can I test that this doesn't break anything? And which other
Joel> python types are suitable for being bases. Why not add all of them?

I think the reason things are the way they are is due to a mix of
ignorance and conservatism.  That is, we probably didn't think about it
early on (I know I didn't), and also we've generally tried to reduce our
exposure to "weird stuff" in case we need to make changes.

Could you elaborate on the uses to which you intend to put this?
That would be helpful.

The only thing I could think of that might be a problem here is
converting the Python subclass to a real `struct value' again.  See
convert_value_from_python, in particular:

      else if (PyObject_TypeCheck (obj, &value_object_type))
	value = value_copy (((value_object *) obj)->value);

Tom


  reply	other threads:[~2010-09-29 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  7:29 Joel Borggrén-Franck
2010-09-29 15:18 ` Joel Borggrén-Franck
2010-09-29 21:23   ` Tom Tromey [this message]
2010-09-30  8:29     ` Joel Borggrén-Franck
2010-10-12 11:58       ` Joel Borggrén-Franck
2010-10-15 22:13         ` Tom Tromey
2010-10-19 19:20           ` Joel Borggrén-Franck

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=m37hi4i6ru.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=joel.borggren.franck@gmail.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