This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 03/12] Iterate over 'struct varobj_item' instead of PyObject
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 21 May 2014 12:01:33 -0600
- Subject: Re: [PATCH 03/12] Iterate over 'struct varobj_item' instead of PyObject
- Authentication-results: sourceware.org; auth=none
- References: <1392367471-13527-1-git-send-email-yao at codesourcery dot com> <1392367471-13527-4-git-send-email-yao at codesourcery dot com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> 2014-02-14 Pedro Alves <pedro@codesourcery.com>
Yao> Yao Qi <yao@codesourcery.com>
Yao> * python/py-varobj.c (py_varobj_iter_next): Move some code
Yao> from varobj.c.
Yao> * varobj-iter.h (struct varobj_item): Moved from varobj.c.
Yao> * varobj.c: Move "varobj-iter.h" inclusion earlier.
Yao> (struct varobj_item): Moved to varobj-iter.h".
Yao> (varobj_clear_saved_item): New function.
Yao> (update_dynamic_varobj_children): Move python-related code to
Yao> py-varobj.c.
Yao> (free_variable): Call varobj_clear_saved_item and
Yao> varobj_iter_delete.
This looks reasonable but I have a question first:
Yao> @@ -802,14 +802,8 @@ update_dynamic_varobj_children (struct varobj *var,
Yao> int to)
Yao> {
Yao> #if HAVE_PYTHON
Yao> - struct cleanup *back_to;
Yao> int i;
Yao> - if (!gdb_python_initialized)
Yao> - return 0;
Where is this check done now? I couldn't find the location.
IIRC this check was added in response to some bug report; I think it
only arises if Python can't be properly initialized somehow.
If it was dropped I think it may need to be reinstated somewhere.
Tom