Use gdbpy_enter in py-type.c
Change py-type.c to use gdbpy_enter. 2017-01-10 Tom Tromey <tom@tromey.com> * python/py-type.c (save_objfile_types): Use gdbpy_enter.
This commit is contained in:
parent
60e600ec69
commit
c57af3f12b
2 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2017-01-10 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* python/py-type.c (save_objfile_types): Use gdbpy_enter.
|
||||||
|
|
||||||
2017-01-10 Tom Tromey <tom@tromey.com>
|
2017-01-10 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* python/python.c (gdbpy_eval_from_control_command)
|
* python/python.c (gdbpy_eval_from_control_command)
|
||||||
|
|
|
@ -1048,14 +1048,13 @@ save_objfile_types (struct objfile *objfile, void *datum)
|
||||||
{
|
{
|
||||||
type_object *obj = (type_object *) datum;
|
type_object *obj = (type_object *) datum;
|
||||||
htab_t copied_types;
|
htab_t copied_types;
|
||||||
struct cleanup *cleanup;
|
|
||||||
|
|
||||||
if (!gdb_python_initialized)
|
if (!gdb_python_initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* This prevents another thread from freeing the objects we're
|
/* This prevents another thread from freeing the objects we're
|
||||||
operating on. */
|
operating on. */
|
||||||
cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
|
gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
|
||||||
|
|
||||||
copied_types = create_copied_types_hash (objfile);
|
copied_types = create_copied_types_hash (objfile);
|
||||||
|
|
||||||
|
@ -1074,8 +1073,6 @@ save_objfile_types (struct objfile *objfile, void *datum)
|
||||||
}
|
}
|
||||||
|
|
||||||
htab_delete (copied_types);
|
htab_delete (copied_types);
|
||||||
|
|
||||||
do_cleanups (cleanup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue