This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 03/12] Iterate over 'struct varobj_item' instead of PyObject


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]