[Wiltshire] Static analysis tools
David Fletcher
dave at thefletchers.net
Mon Jul 13 15:16:51 UTC 2009
On Monday 13 July 2009 15:18:02 John Larkworthy wrote:
> Dave,
>
> GCC does a pretty good static check particularly if you use the -Wall
> option. It will report on apparent use of uniitialised variables which may
> not be your problem. Things like stack overflow or reading beyond array
> bounds are usually trapped using dynamic checkers such as valgrind. This
> would probably mean you need a test harness to drive the code through all
> paths to reveal the nasty little bug.
>
> Actually writing a harness and excuting under gdb/ddd will probably allow
> you to single step through the code and discover the logical error.
>
> John.
>
Yes, I've done some work on one application, porting it to Linux.
Unfortunately there's no suitable PC/104 processor card around here to run it
on the hardware, and I'll also need to do some more work to shift some of it
into a kernel module. But, yes I did end up fixing hundreds of errors and
warnings, and I now have a single set of source code that compiles with
either gcc or the old Borland compiler.
I don't really want to start going through the same exercise again until I see
my first effort working.
I'll be at the pub later, maybe there will be some time to chat more about it
then.
Dave
More information about the Wiltshire
mailing list