mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 21:34:46 +08:00
* python/python.c (source_python_script): Use ensure_python_env
to prepare environment for script.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-04-07 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* python/python.c (source_python_script): Use ensure_python_env
|
||||||
|
to prepare environment for script.
|
||||||
|
|
||||||
2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
|
2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* amd64-linux-nat.c: Include "regset.h", "elf/common.h",
|
* amd64-linux-nat.c: Include "regset.h", "elf/common.h",
|
||||||
|
@ -367,14 +367,14 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args)
|
|||||||
void
|
void
|
||||||
source_python_script (FILE *stream, char *file)
|
source_python_script (FILE *stream, char *file)
|
||||||
{
|
{
|
||||||
PyGILState_STATE state;
|
struct cleanup *cleanup;
|
||||||
|
|
||||||
state = PyGILState_Ensure ();
|
cleanup = ensure_python_env (get_current_arch (), current_language);
|
||||||
|
|
||||||
PyRun_SimpleFile (stream, file);
|
PyRun_SimpleFile (stream, file);
|
||||||
|
|
||||||
fclose (stream);
|
fclose (stream);
|
||||||
PyGILState_Release (state);
|
do_cleanups (cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user