While working on some recent problems at work lately I have come up with some challenges due to the harsh environmental situation that I am working to address. The issues that I am aware of (and find solutions to) are:
1. The environment (Suse Linux 10.3). Resolving package dependencies on such an old distribute can be tricky, particularly since we are locked into the first DVD of the distro.
2. We have to work in a chroot jail which has a pretty limited set of dev libraries to pick from.
3. We cannot alter the make files/system w/o getting permission from on high.
4. We cannot significantly add stuff to the codebase.
With that in mind I am looking for ideas for debugging tools. For one example as part of an answer I gave in another thread ( Codeblocks. ) I ran across cppcheck which is like lint except that it works. We can use GDB but given our weird hardware requires that GDB be run over a serial cable. Because we cannot alter our makefiles that immediately puts the kibosh on things like Electric Fence and most other new/delete overloaders. Valgrind jave a hard time in our world because the strange almost component design means that it doesn't attach to the right process some/most of the time.
So at the end of the day I am looking for any kind of toolset that I can use by just including a header file. If you look at the Linux forum I have demonstrated just such a tool that is bt.hpp; a simple set of function calls that generates a callstack on-demand. The key things about this is it just uses the default libs on any Linux distro; to use it, just include it and call a single function when you need a callstack. This gives you an idea of where the program has been with something bad happens.
I would like to find what other tools like this that others are using that might fit this bill. I have looked at electric fence (which needs a library linked to do its work), DUMA, Valgrind. I am working on a simple smart ptr class that in addition to what a class of that type does (watch for deletes to go with new allocations) but by overloading the [] operator I am trying to watch for a certain class of buffer over and under-runs. Oh yes and this class needs nothing more than a include "bt.hpp" and a single call to trigger it.
The issues I need to solve is a variables being created and used before being initialized, buffer over and underruns, pointers and such being used after they have been deleted, etc. Even header-only code for monitoring hardware and/or system resources (total memory in use, graphics memory, etc. I am slowing building up a library of such tools but with everything that there is already on my plate, any suggestions would be a win.
Thanks and feel free to ask any questions that would help clarify the situation.