This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [python] PR python/15461 (gate architecture calls)
- From: <Paul_Koning at Dell dot com>
- To: <tromey at redhat dot com>
- Cc: <pmuldoon at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Wed, 28 Aug 2013 18:13:50 +0000
- Subject: Re: [patch] [python] PR python/15461 (gate architecture calls)
- Authentication-results: sourceware.org; auth=none
- References: <521DE761 dot 6010403 at redhat dot com> <87d2oxvgye dot fsf at fleche dot redhat dot com>
On Aug 28, 2013, at 1:54 PM, Tom Tromey <tromey@redhat.com> wrote:
> Phil> Something I thought about is not allowing gdb.Architecture to be
> Phil> instantiated directly, but I could not think of a clean way to do
> Phil> this.
>
> Did you think of any way?
> It seems like a good thing to prevent.
Ditto for all the existing types for which direct instantiation doesn't do anything useful.
I haven't tried this, but judging from the Python docs, if you point the tp_new field of the type object to a function that sets a suitable Python exception, that should do the job.
paul