This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog contrib/gcc-with-excheck con ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2013-05-30 16:22:06

Modified files:
	gdb            : ChangeLog 
	gdb/contrib    : gcc-with-excheck 
Added files:
	gdb/contrib    : cleanup_check.py 

Log message:
	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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15636&r2=1.15637
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/contrib/cleanup_check.py.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/contrib/gcc-with-excheck.diff?cvsroot=src&r1=1.1&r2=1.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]