diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:30:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:30:03 +0000 |
commit | 232cf858dc9952f123510778333b2e8ab2dc56f9 (patch) | |
tree | 712e835f7e4521ea10f2cb39b90c9c57467ee3b0 /gdb/python/python.c | |
parent | 2ddc5b46e057658b157c26045d74d7d3bbc0c271 (diff) | |
download | gdb-232cf858dc9952f123510778333b2e8ab2dc56f9.tar.gz |
use explicit returns to avoid checker confusion
The checker does not understand the idiom
if (except.reason < 0) {
do_cleanups (whatever);
GDB_PY_HANDLE_EXCEPTION (except);
}
because it doesn't realize that the nested 'if' actually has the same
condition.
This fixes instances of this to be more explicit.
* python/py-breakpoint.c (bppy_get_commands): Use
explicit, unconditional return.
* python/py-frame.c (frapy_read_var): Likewise.
* python/python.c (gdbpy_decode_line): Likewise.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 690534f1539..c94198e2985 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -653,7 +653,8 @@ gdbpy_decode_line (PyObject *self, PyObject *args) { do_cleanups (cleanups); /* We know this will always throw. */ - GDB_PY_HANDLE_EXCEPTION (except); + gdbpy_convert_exception (except); + return NULL; } if (sals.nelts) |