From: "Joel Borggrén-Franck" <joel.borggren.franck@gmail.com>
To: gdb@sourceware.org
Subject: Re: Extending gdb.Value
Date: Wed, 29 Sep 2010 15:18:00 -0000 [thread overview]
Message-ID: <AANLkTinLE4MRH051h5LMjJbkrYe5scj+P7VxxCr=WYgh@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=oB1i9ADQgT_m1hByFVA++6A1-OUUadh14VtWA@mail.gmail.com>
On Fri, Sep 24, 2010 at 9:28 AM, Joel Borggrén-Franck
<joel.borggren.franck@gmail.com> wrote:
> So I noticed today that I cant extend gdb.Value:
>
The fix for this is trivial:
--- gdb-7.2-orig/gdb/python/py-value.c 2010-06-28 23:16:03.000000000 +0200
+++ gdb-7.2/gdb/python/py-value.c 2010-09-29 13:33:00.000000000 +0200
@@ -1156,7 +1156,7 @@
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE,
/*tp_flags*/
"GDB value object", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
I'm convinced this is a good idea. I got lots of stuff I would like to
add on top of gdb.Value that only makes sense in the context of
specific applications.
So how can I test that this doesn't break anything? And which other
python types are suitable for being bases. Why not add all of them?
Cheers
/Joel
next prev parent reply other threads:[~2010-09-29 15:18 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 [this message]
2010-09-29 21:23 ` Tom Tromey
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='AANLkTinLE4MRH051h5LMjJbkrYe5scj+P7VxxCr=WYgh@mail.gmail.com' \
--to=joel.borggren.franck@gmail.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