old-cross-binutils/gdb/contrib
Tom Tromey af83e3f886 add the cleanup checker
This patch adds the cleanup checker.  This is a Python plugin for GCC
that checks some rules for cleanup handling.  In particular it tries
to notice when cleanups are left dangling at the end of a function.

It does this by applying a few simple rules.

First, it understands that a function whose return type is "struct
cleanup *" is a "cleanup constructor".  Such functions are expected to
return the first cleanup that they make.

Then, it has the notion of a "master cleanup".  The checker keeps a
stack of all cleanups made in a basic block.  The first element is
pushed on the stack is the master cleanup -- the one that must later
be passed to either do_cleanups or discard_cleanups.

It is not perfect -- some constructs confuse it.  So, part of this
series rewrites some code in gdb so that it is analyzable.  I'll note
these spots and you can decide whether or not this is a good idea.

This patch also changes gcc-with-excheck to give it options.  Now you
must use either -Xc (for the cleanup checker) or -Xx (for the
exception checker).

	* contrib/cleanup_check.py: New file.
	* contrib/gcc-with-excheck: Add option parsing.
2013-05-30 16:22:06 +00:00
..
ari * contrib/ari/gdb_ari.sh (SOLIB_ADD, SOLIB_CREATE_INFERIOR_HOOK) 2013-05-07 13:00:07 +00:00
cc-with-tweaks.sh * contrib/cc-with-tweaks.sh (-p): Handle no dwo files. 2013-05-24 00:30:24 +00:00
cleanup_check.py add the cleanup checker 2013-05-30 16:22:06 +00:00
excheck.py * contrib/excheck.py: New file. 2013-02-28 19:28:25 +00:00
expect-read1.c gdb/ 2013-02-03 16:27:57 +00:00
expect-read1.sh gdb/ 2013-02-03 16:27:57 +00:00
exsummary.py * contrib/excheck.py: New file. 2013-02-28 19:28:25 +00:00
gcc-with-excheck add the cleanup checker 2013-05-30 16:22:06 +00:00
test_pubnames_and_indexes.py Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00