|
From: John C. <joh...@ta...> - 2002-12-17 03:06:34
|
Here is an idea for a skin. Old C++ programs tend to accumulate many instance variables which are never used anywhere. Or the programmer thinks they are used, but due to a typo something else is being used. How difficult would it be to create a valgrind skin that at the end of the program listed every variable that is declared in the code, but was never initialised by the program. gcc can detect whether local variables / parameters are unused in the sense of never referred to, but has no handle on instance variables nor on variables that are referred to but never actually accessed. ps: valgrind-1.9.2 seems to be running OK on Redhat V8.0 gcc-3.2 John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : joh...@ta... New Zealand Good Ideas: Ruby - http://www.ruby-lang-org - The best of perl,python,scheme without the pain. Valgrind - http://developer.kde.org/~sewardj/ - memory debugger for x86-GNU/Linux Free your books - http://www.bookcrossing.com Memtest86 - http://www.memtest86.com - Free standalone, excellent memory tester for PC's. |
|
From: John C. <joh...@ta...> - 2002-12-17 06:02:14
|
On Tue, 17 Dec 2002, John Carter wrote: > How difficult would it be to create a valgrind skin that at the end of the > program listed every variable that is declared in the code, but was never > initialised by the program. Hmm, even more useful, find all values that are validly computed, but never used. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : joh...@ta... New Zealand Good Ideas: Ruby - http://www.ruby-lang-org - The best of perl,python,scheme without the pain. Valgrind - http://developer.kde.org/~sewardj/ - memory debugger for x86-GNU/Linux Free your books - http://www.bookcrossing.com Memtest86 - http://www.memtest86.com - Free standalone, excellent memory tester for PC's. |