diff options
author | Doug Evans <dje@google.com> | 2010-05-19 21:57:24 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-05-19 21:57:24 +0000 |
commit | 3a1d4620d60dd678aa4d5a62f877caf0a5f209f1 (patch) | |
tree | 3425b2b64fd027f525dad24dfa5ed356448dd231 /gdb/python | |
parent | b72374d8f5ad2b161d2504b8ea94016f3fc0989b (diff) | |
download | gdb-3a1d4620d60dd678aa4d5a62f877caf0a5f209f1.zip gdb-3a1d4620d60dd678aa4d5a62f877caf0a5f209f1.tar.gz gdb-3a1d4620d60dd678aa4d5a62f877caf0a5f209f1.tar.bz2 |
* python.c (source_python_script): Add comment.
(source_python_script_for_objfile): Remove unnecessary call to
gdbpy_print_stack.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/python.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index f03af2e..9c1e8bd 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -377,6 +377,8 @@ source_python_script (FILE *stream, const char *file) cleanup = ensure_python_env (get_current_arch (), current_language); + /* Note: If an exception occurs python will print the traceback and + clear the error indicator. */ PyRun_SimpleFile (stream, file); do_cleanups (cleanup); @@ -480,10 +482,9 @@ source_python_script_for_objfile (struct objfile *objfile, cleanups = ensure_python_env (get_objfile_arch (objfile), current_language); gdbpy_current_objfile = objfile; - /* We don't want to throw an exception here -- but the user - would like to know that something went wrong. */ - if (PyRun_SimpleFile (stream, file)) - gdbpy_print_stack (); + /* Note: If an exception occurs python will print the traceback and + clear the error indicator. */ + PyRun_SimpleFile (stream, file); do_cleanups (cleanups); gdbpy_current_objfile = NULL; |