diff options
author | Doug Evans <dje@google.com> | 2011-09-19 19:01:40 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2011-09-19 19:01:40 +0000 |
commit | 562f943bccc5f35b000983a1aa9f9a8af7b3cad0 (patch) | |
tree | 098c1a94f04ce0dd792178951dc80ddef06ed6e2 /gdb/python/python.c | |
parent | 3c9057f3816867fcf94bec3e264c2b7b0873fd29 (diff) | |
download | gdb-562f943bccc5f35b000983a1aa9f9a8af7b3cad0.zip gdb-562f943bccc5f35b000983a1aa9f9a8af7b3cad0.tar.gz gdb-562f943bccc5f35b000983a1aa9f9a8af7b3cad0.tar.bz2 |
* python/py-auto-load.c (source_section_scripts): Fix file
descriptor leak.
* python/python.c (source_python_script_for_objfile): Tweak comments.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 67649c3..4ef5715 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -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); |