mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
* python/py-auto-load.c (source_section_scripts): Fix file
descriptor leak. * python/python.c (source_python_script_for_objfile): Tweak comments.
This commit is contained in:
@ -903,7 +903,10 @@ gdbpy_progspaces (PyObject *unused1, PyObject *unused2)
|
||||
static struct objfile *gdbpy_current_objfile;
|
||||
|
||||
/* Set the current objfile to OBJFILE and then read STREAM,FILE as
|
||||
Python code. */
|
||||
Python code.
|
||||
STREAM is left open, it is up to the caller to close it.
|
||||
If an exception occurs python will print the traceback and
|
||||
clear the error indicator. */
|
||||
|
||||
void
|
||||
source_python_script_for_objfile (struct objfile *objfile,
|
||||
@ -914,8 +917,6 @@ source_python_script_for_objfile (struct objfile *objfile,
|
||||
cleanups = ensure_python_env (get_objfile_arch (objfile), current_language);
|
||||
gdbpy_current_objfile = objfile;
|
||||
|
||||
/* Note: If an exception occurs python will print the traceback and
|
||||
clear the error indicator. */
|
||||
PyRun_SimpleFile (stream, file);
|
||||
|
||||
do_cleanups (cleanups);
|
||||
|
Reference in New Issue
Block a user