This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog python/py-breakpoint.c pytho ...
- From: tromey at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: Thu, 30 May 2013 17:30:03 +0000
- Subject: src/gdb ChangeLog python/py-breakpoint.c pytho ...
CVSROOT: /cvs/src
Module name: src
Changes by: tromey@sourceware.org 2013-05-30 17:30:03
Modified files:
gdb : ChangeLog
gdb/python : py-breakpoint.c py-frame.c python.c
Log message:
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.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15663&r2=1.15664
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-breakpoint.c.diff?cvsroot=src&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-frame.c.diff?cvsroot=src&r1=1.35&r2=1.36
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/python.c.diff?cvsroot=src&r1=1.119&r2=1.120