This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [RFC][1/5] Changes to the current branch
- From: Tom Tromey <tromey at redhat dot com>
- To: Oguz Kayral <oguzkayral at gmail dot com>
- Cc: archer at sourceware dot org
- Date: Mon, 21 Sep 2009 15:52:35 -0600
- Subject: Re: [RFC][1/5] Changes to the current branch
- References: <36a35d480908230834n73393daduc92857e82aa2f234@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
Oguz> diff --git a/gdb/python/python-breakpoint.c b/gdb/python/python-breakpoint.c
Oguz> -struct breakpoint_object
Oguz> -{
Oguz> - PyObject_HEAD
Oguz> -
Oguz> - /* The breakpoint number according to gdb. */
Oguz> - int number;
Oguz> -
Oguz> - /* The gdb breakpoint object, or NULL if the breakpoint has been
Oguz> - deleted. */
Oguz> - struct breakpoint *bp;
Oguz> -};
It seems to me that this type could still be private to the breakpoint
code. I think it is generally preferable to do this and use accessor
functions.
Oguz> +static void
Oguz> +python_on_normal_stop (struct bpstats *bs, int print_frame)
Oguz> +{
[...]
Oguz> + state = PyGILState_Ensure ();
We use cleanups for acquiring the GIL now.
Oguz> +static void
Oguz> +python_thread_exit (struct thread_info *tp, int ignore)
Oguz> +{
[...]
Oguz> + long long int *exit_code;
You can't use long long; just use LONGEST instead.
Oguz> + { "stop_eventregistry", thpy_get_stop_eventregistry, NULL, "Stop
Oguz> event registry object of the thread.", NULL },
I'm not so sure about the names ending in "registry".
"stop_event" seems just as clear to me.
Tom